Class SerializableParameter
- java.lang.Object
-
- org.mariadb.jdbc.internal.com.send.parameters.SerializableParameter
-
- All Implemented Interfaces:
Cloneable
,ParameterHolder
public class SerializableParameter extends Object implements Cloneable, ParameterHolder
-
-
Field Summary
-
Fields inherited from interface org.mariadb.jdbc.internal.com.send.parameters.ParameterHolder
BINARY_INTRODUCER, QUOTE
-
-
Constructor Summary
Constructors Constructor Description SerializableParameter(Object object, boolean noBackslashEscapes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBeLongData()
int
getApproximateTextProtocolLength()
Return approximated data calculated length.ColumnType
getColumnType()
boolean
isNullData()
String
toString()
void
writeBinary(PacketOutputStream pos)
Write data to socket in binary format.void
writeTo(PacketOutputStream pos)
Write object to buffer for text protocol.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.mariadb.jdbc.internal.com.send.parameters.ParameterHolder
writeLongData
-
-
-
-
Constructor Detail
-
SerializableParameter
public SerializableParameter(Object object, boolean noBackslashEscapes)
-
-
Method Detail
-
writeTo
public void writeTo(PacketOutputStream pos) throws IOException
Write object to buffer for text protocol.- Specified by:
writeTo
in interfaceParameterHolder
- Parameters:
pos
- the stream to write to- Throws:
IOException
- if error reading stream
-
getApproximateTextProtocolLength
public int getApproximateTextProtocolLength() throws IOException
Return approximated data calculated length.- Specified by:
getApproximateTextProtocolLength
in interfaceParameterHolder
- 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 interfaceParameterHolder
- Parameters:
pos
- socket output stream- Throws:
IOException
- if socket error occur
-
toString
public String toString()
- Specified by:
toString
in interfaceParameterHolder
- Overrides:
toString
in classObject
-
getColumnType
public ColumnType getColumnType()
- Specified by:
getColumnType
in interfaceParameterHolder
-
isNullData
public boolean isNullData()
- Specified by:
isNullData
in interfaceParameterHolder
-
canBeLongData
public boolean canBeLongData()
- Specified by:
canBeLongData
in interfaceParameterHolder
-
-