Class ReaderParameter
java.lang.Object
org.mariadb.jdbc.internal.com.send.parameters.ReaderParameter
- All Implemented Interfaces:
Cloneable,ParameterHolder
-
Field Summary
FieldsFields inherited from interface org.mariadb.jdbc.internal.com.send.parameters.ParameterHolder
BINARY_INTRODUCER, QUOTE -
Constructor Summary
ConstructorsConstructorDescriptionReaderParameter(Reader reader, boolean noBackslashEscapes) ReaderParameter(Reader reader, long length, boolean noBackslashEscapes) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionlongReturn approximated data calculated length for rewriting queries.booleanbooleantoString()voidWrite data to socket in binary format.voidWrite reader to database in text format.
-
Field Details
-
reader
-
length
private final long length -
noBackslashEscapes
private final boolean noBackslashEscapes
-
-
Constructor Details
-
ReaderParameter
Constructor.- Parameters:
reader- reader to writelength- max length to write (can be null)noBackslashEscapes- must backslash be escape
-
ReaderParameter
-
-
Method Details
-
writeTo
Write reader to database in text format.- Specified by:
writeToin interfaceParameterHolder- Parameters:
pos- database outputStream- Throws:
IOException- if any error occur when reading reader
-
getApproximateTextProtocolLength
public long getApproximateTextProtocolLength()Return approximated data calculated length for rewriting queries.- Specified by:
getApproximateTextProtocolLengthin interfaceParameterHolder- Returns:
- approximated data length.
-
writeBinary
Write data to socket in binary format.- Specified by:
writeBinaryin interfaceParameterHolder- Parameters:
pos- socket output stream- Throws:
IOException- if socket error occur
-
getColumnType
- Specified by:
getColumnTypein interfaceParameterHolder
-
toString
- Specified by:
toStringin interfaceParameterHolder- Overrides:
toStringin classObject
-
isNullData
public boolean isNullData()- Specified by:
isNullDatain interfaceParameterHolder
-
isLongData
public boolean isLongData()- Specified by:
isLongDatain interfaceParameterHolder
-