Package org.mariadb.jdbc.message.client
Class LongDataPacket
- java.lang.Object
-
- org.mariadb.jdbc.message.client.LongDataPacket
-
- All Implemented Interfaces:
ClientMessage
public final class LongDataPacket extends java.lang.Object implements ClientMessage
COM_STMT_SEND_LONG_DATAPermit to send ONE value in a dedicated packet. The advantage is when length is unknown, to stream easily data to socket
https://mariadb.com/kb/en/com_stmt_send_long_data/
-
-
Field Summary
Fields Modifier and Type Field Description private intindexprivate Parameterparameterprivate intstatementId
-
Constructor Summary
Constructors Constructor Description LongDataPacket(int statementId, Parameter parameter, int index)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intencode(Writer writer, Context context)Encode client message to socket.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mariadb.jdbc.message.ClientMessage
batchUpdateLength, binaryProtocol, canSkipMeta, description, getLocalInfileInputStream, mightBeBulkResult, readPacket, validateLocalFileName
-
-
-
-
Field Detail
-
statementId
private final int statementId
-
parameter
private final Parameter parameter
-
index
private final int index
-
-
Constructor Detail
-
LongDataPacket
public LongDataPacket(int statementId, Parameter parameter, int index)Constructor- Parameters:
statementId- statement identifierparameter- parameterindex- index
-
-
Method Detail
-
encode
public int encode(Writer writer, Context context) throws java.io.IOException, java.sql.SQLException
Description copied from interface:ClientMessageEncode client message to socket.- Specified by:
encodein interfaceClientMessage- Parameters:
writer- socket writercontext- connection context- Returns:
- number of client message written
- Throws:
java.io.IOException- if socket error occurjava.sql.SQLException- if any issue occurs
-
-