org.mariadb.jdbc.internal.com.send.parameters
Class StringParameter

java.lang.Object
  extended by org.mariadb.jdbc.internal.com.send.parameters.StringParameter
All Implemented Interfaces:
Cloneable, ParameterHolder

public class StringParameter
extends Object
implements Cloneable, ParameterHolder


Field Summary
 
Fields inherited from interface org.mariadb.jdbc.internal.com.send.parameters.ParameterHolder
BINARY_INTRODUCER, QUOTE
 
Constructor Summary
StringParameter(String str, boolean noBackslashEscapes)
           
 
Method Summary
 long getApproximateTextProtocolLength()
           
 ColumnType getColumnType()
           
 boolean isLongData()
           
 boolean isNullData()
           
 String toString()
           
 void writeBinary(PacketOutputStream pos)
          Write data to socket in binary format.
 void writeTo(PacketOutputStream pos)
          Send escaped String to outputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringParameter

public StringParameter(String str,
                       boolean noBackslashEscapes)
                throws SQLException
Throws:
SQLException
Method Detail

writeTo

public void writeTo(PacketOutputStream pos)
             throws IOException
Send escaped String to outputStream.

Specified by:
writeTo in interface ParameterHolder
Parameters:
pos - outpustream.
Throws:
IOException - when something goes wrong

getApproximateTextProtocolLength

public long getApproximateTextProtocolLength()
Specified by:
getApproximateTextProtocolLength in interface ParameterHolder

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.