org.mariadb.jdbc.internal.packet.dao.parameters

## Class StreamParameter

- java.lang.Object
- - org.mariadb.jdbc.internal.packet.dao.parameters.StreamParameter

All Implemented Interfaces:
  ParameterHolder

    public class StreamParameter
    extends Object
    implements ParameterHolder

### Constructor Summary

Constructors
Constructor and Description
`StreamParameter(InputStream is, boolean noBackSlashEscapes)`
`StreamParameter(InputStream is, long length, boolean noBackslashEscapes)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `getApproximateTextProtocolLength()` Return approximated data calculated length.
`MariaDbType` `getMariaDbType()`
`boolean` `isLongData()`
`boolean` `isNullData()`
`String` `toString()`
`void` `writeBinary(PacketOutputStream os)` Write stream in binary format.
`void` `writeTo(PacketOutputStream os)` Write stream in text format.
`void` `writeUnsafeTo(PacketOutputStream os)` Write stream in text format without checking buffer size.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### StreamParameter

    public StreamParameter(InputStream is,
                           long length,
                           boolean noBackslashEscapes)

Constructor.

Parameters:
  `is` - stream to write
  `length` - max length to write (if null the whole stream will be send)
  `noBackslashEscapes` - must backslash be escape

#### StreamParameter

    public StreamParameter(InputStream is,
                           boolean noBackSlashEscapes)

### Method Detail

#### writeTo

    public void writeTo(PacketOutputStream os)
                 throws IOException

Write stream in text format.

Specified by:
  `writeTo` in interface `ParameterHolder`
Parameters:
  `os` - database outputStream
Throws:
  `IOException` - if any error occur when reader stream

#### writeUnsafeTo

    public void writeUnsafeTo(PacketOutputStream os)
                       throws IOException

Write stream in text format without checking buffer size.

Specified by:
  `writeUnsafeTo` in interface `ParameterHolder`
Parameters:
  `os` - database outputStream
Throws:
  `IOException` - if any error occur when reader stream

#### getApproximateTextProtocolLength

    public long getApproximateTextProtocolLength()
                                          throws IOException

Return approximated data calculated length.

Specified by:
  `getApproximateTextProtocolLength` in interface `ParameterHolder`
Returns:
  approximated data length.
Throws:
  `IOException` - if error reading stream

#### writeBinary

    public void writeBinary(PacketOutputStream os)
                     throws IOException

Write stream in binary format.

Specified by:
  `writeBinary` in interface `ParameterHolder`
Parameters:
  `os` - database outputStream
Throws:
  `IOException` - if any error occur when reader stream

#### toString

    public String toString()

Specified by:
  `toString` in interface `ParameterHolder`
Overrides:
  `toString` in class `Object`

#### getMariaDbType

    public MariaDbType getMariaDbType()

Specified by:
  `getMariaDbType` in interface `ParameterHolder`

#### isLongData

    public boolean isLongData()

Specified by:
  `isLongData` in interface `ParameterHolder`

#### isNullData

    public boolean isNullData()

Specified by:
  `isNullData` in interface `ParameterHolder`