org.mariadb.jdbc.internal.com.send.parameters
Class ReaderParameter
java.lang.Object
org.mariadb.jdbc.internal.com.send.parameters.ReaderParameter
- All Implemented Interfaces:
- Cloneable, ParameterHolder
public class ReaderParameter
- extends Object
- implements Cloneable, ParameterHolder
ReaderParameter
public ReaderParameter(Reader reader,
long length,
boolean noBackslashEscapes)
- Constructor.
- Parameters:
reader
- reader to writelength
- max length to write (can be null)noBackslashEscapes
- must backslash be escape
ReaderParameter
public ReaderParameter(Reader reader,
boolean noBackslashEscapes)
writeTo
public void writeTo(PacketOutputStream pos)
throws IOException
- Write reader to database in text format.
- Specified by:
writeTo
in interface ParameterHolder
- Parameters:
pos
- 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 pos)
throws IOException
- Write data to socket in binary format.
- Specified by:
writeBinary
in interface ParameterHolder
- Parameters:
pos
- socket output stream
- Throws:
IOException
- if socket error occur
getColumnType
public ColumnType getColumnType()
- Specified by:
getColumnType
in interface ParameterHolder
toString
public String toString()
- Specified by:
toString
in interface ParameterHolder
- Overrides:
toString
in class Object
isNullData
public boolean isNullData()
- Specified by:
isNullData
in interface ParameterHolder
isLongData
public boolean isLongData()
- Specified by:
isLongData
in interface ParameterHolder
Copyright © 2017. All rights reserved.