public class ReaderParameter extends Object implements ParameterHolder
Constructor and Description |
---|
ReaderParameter(Reader reader,
boolean noBackslashEscapes) |
ReaderParameter(Reader reader,
long length,
boolean noBackslashEscapes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public ReaderParameter(Reader reader, long length, boolean noBackslashEscapes)
reader
- reader to writelength
- max length to write (can be null)noBackslashEscapes
- must backslash be escapepublic ReaderParameter(Reader reader, boolean noBackslashEscapes)
public void writeTo(PacketOutputStream os) throws IOException
writeTo
in interface ParameterHolder
os
- database outputStreamIOException
- if any error occur when reading readerpublic void writeUnsafeTo(PacketOutputStream os) throws IOException
writeUnsafeTo
in interface ParameterHolder
os
- database outputStreamIOException
- if any error occur when reading readerpublic long getApproximateTextProtocolLength() throws IOException
getApproximateTextProtocolLength
in interface ParameterHolder
IOException
- if error reading streampublic void writeBinary(PacketOutputStream os) throws IOException
writeBinary
in interface ParameterHolder
os
- database outputStreamIOException
- if any error occur when reading readerpublic MariaDbType getMariaDbType()
getMariaDbType
in interface ParameterHolder
public String toString()
toString
in interface ParameterHolder
toString
in class Object
public boolean isLongData()
isLongData
in interface ParameterHolder
public boolean isStream()
public boolean isNullData()
isNullData
in interface ParameterHolder
Copyright © 2016. All rights reserved.