Package org.mariadb.jdbc.message.client

## Class LongDataPacket

- java.lang.Object
- - org.mariadb.jdbc.message.client.LongDataPacket

All Implemented Interfaces:
  `org.mariadb.jdbc.message.ClientMessage`

    public final class LongDataPacket
    extends Object
    implements org.mariadb.jdbc.message.ClientMessage

COM_STMT_SEND_LONG_DATA

Permit 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/

### Constructor Summary

Constructors
`LongDataPacket​(int statementId, Parameter parameter, int index)` Constructor

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `encode​(Writer writer, org.mariadb.jdbc.client.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, readPacket, validateLocalFileName`

### Constructor Detail

#### LongDataPacket

    public LongDataPacket​(int statementId,
                          Parameter parameter,
                          int index)

Constructor

Parameters:
  `statementId` - statement identifier
  `parameter` - parameter
  `index` - index

### Method Detail

#### encode

    public int encode​(Writer writer,
                      org.mariadb.jdbc.client.Context context)
               throws IOException,
                      SQLException

Description copied from interface: `org.mariadb.jdbc.message.ClientMessage`
Encode client message to socket.

Specified by:
  `encode` in interface `org.mariadb.jdbc.message.ClientMessage`
Parameters:
  `writer` - socket writer
  `context` - connection context
Returns:
  number of client message written
Throws:
  `IOException` - if socket error occur
  `SQLException` - if any issue occurs