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

## Class ReaderParameter

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

All Implemented Interfaces:
  ParameterHolder

    public class ReaderParameter
    extends Object
    implements ParameterHolder

### Constructor Summary

Constructors
Constructor and Description
`ReaderParameter(Reader reader, boolean noBackslashEscapes)`
`ReaderParameter(Reader reader, long length, boolean noBackslashEscapes)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `getApproximateTextProtocolLength()` Return approximated data calculated length for rewriting queries
`MariaDbType` `getMariaDbType()`
`boolean` `isLongData()`
`boolean` `isNullData()`
`boolean` `isStream()`
`String` `toString()`
`void` `writeBinary(PacketOutputStream os)` Write reader to database in binary format.
`void` `writeTo(PacketOutputStream os)` Write reader to database in text format.
`void` `writeUnsafeTo(PacketOutputStream os)` Write reader to database 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

#### ReaderParameter

    public ReaderParameter(Reader reader,
                           long length,
                           boolean noBackslashEscapes)

Constructor.

Parameters:
  `reader` - reader to write
  `length` - max length to write (can be null)
  `noBackslashEscapes` - must backslash be escape

#### ReaderParameter

    public ReaderParameter(Reader reader,
                           boolean noBackslashEscapes)

### Method Detail

#### writeTo

    public void writeTo(PacketOutputStream os)
                 throws IOException

Write reader to database in text format.

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

#### writeUnsafeTo

    public void writeUnsafeTo(PacketOutputStream os)
                       throws IOException

Write reader to database in text format without checking buffer size.

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

#### getApproximateTextProtocolLength

    public long getApproximateTextProtocolLength()
                                          throws IOException

Return approximated data calculated length for rewriting queries

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 reader to database in binary format.

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

#### getMariaDbType

    public MariaDbType getMariaDbType()

Specified by:
  `getMariaDbType` in interface `ParameterHolder`

#### toString

    public String toString()

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

#### isLongData

    public boolean isLongData()

Specified by:
  `isLongData` in interface `ParameterHolder`

#### isStream

    public boolean isStream()

#### isNullData

    public boolean isNullData()

Specified by:
  `isNullData` in interface `ParameterHolder`