public class ReaderParameter extends java.lang.Object implements java.lang.Cloneable, ParameterHolder
| Modifier and Type | Field and Description |
|---|---|
private long |
length |
private boolean |
noBackslashEscapes |
private java.io.Reader |
reader |
BINARY_INTRODUCER, QUOTE| Constructor and Description |
|---|
ReaderParameter(java.io.Reader reader,
boolean noBackslashEscapes) |
ReaderParameter(java.io.Reader reader,
long length,
boolean noBackslashEscapes)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeLongData() |
int |
getApproximateTextProtocolLength()
Return approximated data calculated length for rewriting queries.
|
ColumnType |
getColumnType() |
boolean |
isNullData() |
java.lang.String |
toString() |
void |
writeBinary(PacketOutputStream pos)
Write data to socket in binary format.
|
void |
writeLongData(PacketOutputStream pos) |
void |
writeTo(PacketOutputStream pos)
Write reader to database in text format.
|
private final java.io.Reader reader
private final long length
private final boolean noBackslashEscapes
public ReaderParameter(java.io.Reader reader,
long length,
boolean noBackslashEscapes)
reader - reader to writelength - max length to write (can be null)noBackslashEscapes - must backslash be escapepublic ReaderParameter(java.io.Reader reader,
boolean noBackslashEscapes)
public void writeTo(PacketOutputStream pos) throws java.io.IOException
writeTo in interface ParameterHolderpos - database outputStreamjava.io.IOException - if any error occur when reading readerpublic int getApproximateTextProtocolLength()
getApproximateTextProtocolLength in interface ParameterHolderpublic void writeBinary(PacketOutputStream pos) throws java.io.IOException
writeBinary in interface ParameterHolderpos - socket output streamjava.io.IOException - if socket error occurpublic void writeLongData(PacketOutputStream pos) throws java.io.IOException
writeLongData in interface ParameterHolderjava.io.IOExceptionpublic ColumnType getColumnType()
getColumnType in interface ParameterHolderpublic java.lang.String toString()
toString in interface ParameterHoldertoString in class java.lang.Objectpublic boolean isNullData()
isNullData in interface ParameterHolderpublic boolean canBeLongData()
canBeLongData in interface ParameterHolder