Class SerializableParameter
- java.lang.Object
-
- org.mariadb.jdbc.internal.com.send.parameters.SerializableParameter
-
- All Implemented Interfaces:
java.lang.Cloneable
,ParameterHolder
public class SerializableParameter extends java.lang.Object implements java.lang.Cloneable, ParameterHolder
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
loadedStream
private boolean
noBackSlashEscapes
private java.lang.Object
object
-
Fields inherited from interface org.mariadb.jdbc.internal.com.send.parameters.ParameterHolder
BINARY_INTRODUCER, QUOTE
-
-
Constructor Summary
Constructors Constructor Description SerializableParameter(java.lang.Object object, boolean noBackslashEscapes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getApproximateTextProtocolLength()
Return approximated data calculated length.ColumnType
getColumnType()
boolean
isLongData()
boolean
isNullData()
java.lang.String
toString()
void
writeBinary(PacketOutputStream pos)
Write data to socket in binary format.private void
writeObjectToBytes()
void
writeTo(PacketOutputStream pos)
Write object to buffer for text protocol.
-
-
-
Method Detail
-
writeTo
public void writeTo(PacketOutputStream pos) throws java.io.IOException
Write object to buffer for text protocol.- Specified by:
writeTo
in interfaceParameterHolder
- Parameters:
pos
- the stream to write to- Throws:
java.io.IOException
- if error reading stream
-
writeObjectToBytes
private void writeObjectToBytes() throws java.io.IOException
- Throws:
java.io.IOException
-
getApproximateTextProtocolLength
public int getApproximateTextProtocolLength() throws java.io.IOException
Return approximated data calculated length.- Specified by:
getApproximateTextProtocolLength
in interfaceParameterHolder
- Returns:
- approximated data length.
- Throws:
java.io.IOException
- if error reading stream
-
writeBinary
public void writeBinary(PacketOutputStream pos) throws java.io.IOException
Write data to socket in binary format.- Specified by:
writeBinary
in interfaceParameterHolder
- Parameters:
pos
- socket output stream- Throws:
java.io.IOException
- if socket error occur
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfaceParameterHolder
- Overrides:
toString
in classjava.lang.Object
-
getColumnType
public ColumnType getColumnType()
- Specified by:
getColumnType
in interfaceParameterHolder
-
isNullData
public boolean isNullData()
- Specified by:
isNullData
in interfaceParameterHolder
-
isLongData
public boolean isLongData()
- Specified by:
isLongData
in interfaceParameterHolder
-
-