| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| pack-priv static final int | |
| pack-priv static final int | |
| public static final long | |
| private int | |
| private int | |
| private Map | |
| public static final short | |
| public static final short | |
| public static final short | TYPE_ID_AUTH_SWITCH
It has the same signature as EOF, but may be issued by server only during handshake phase |
| public static final short | |
| public static final short | |
| public static final short | |
| public static final short |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | adjustPayloadLength()
To be called after write operations to ensure that payloadLength contains the real size of written data. |
| public final void | ensureCapacity(int
additional data size in bytes additionalData)Checks that underlying buffer has enough space to store additionalData bytes starting from current position. |
| public static String | extractSqlFromPacket(String possibleSqlQuery, NativePacketPayload packet, int endOfQueryPacketPosition, int maxQuerySizeToLog)
|
| public byte[] | getByteBuffer()
Implements com. Returns the array of bytes this Buffer is using to read from. |
| public int | |
| public int | |
| public int | getPosition()
Implements com. Returns the current position to write to/ read from |
| public int | |
| public final boolean | Returns: true if it is a Protocol::AuthSwitchRequest packetIs it a Protocol::AuthSwitchRequest packet. |
| public final boolean | Returns: true if it is a Protocol::AuthMoreData packetIs it a Protocol::AuthMoreData packet. |
| public final boolean | Returns: true if it is a Protocol::AuthNextFactor packetIs it a Protocol::AuthNextFactor packet. |
| public final boolean | |
| public boolean | |
| public final boolean | |
| public final boolean | Returns: true if it is an OK packet for ResultSetIs it an OK packet for ResultSet. |
| public byte[] | Returns: bytesRead bytes from internal buffer starting from current position into the new byte array. |
| public byte[] | Returns: byteslength len)Read len bytes from internal buffer starting from current position into the new byte array. |
| public final long | Returns: longRead data according to provided Integer type. |
| public String | Returns: stringif null then platform default encoding is used encoding)Read bytes from internal buffer starting from current position decoding them into String using the specified character encoding. |
| public String | Returns: stringif null then platform default encoding is used encoding, int length len)Read len bytes from internal buffer starting from current position decoding them into String using the specified character encoding. |
| public void | setByteBuffer(byte[]
the array of bytes to use as a buffer byteBufferToSet)Sets the array of bytes to use as a buffer to read from. |
| public void | |
| public void | setPosition(int
the position (0-based index) positionToSet)Set the current position to write to/ read from |
| public int | |
| public void | skipBytes(NativeConstants.
Set position to next value in internal buffer skipping the current value according to |
| public String | |
| public String | |
| public final void | writeBytes(NativeConstants.
on-wire data type type,from byte array b)Write all bytes from given byte array into internal buffer starting with current buffer position. |
| public final void | writeBytes(NativeConstants.
on-wire data type type,from byte array b)Write all bytes from given byte array into internal buffer starting with current buffer position. |
| public void | writeBytes(NativeConstants.
on-wire data type type,from byte array b, int starting index of b offset, int number of bytes to be written len)Write len bytes from given byte array into internal buffer. |
| public void | writeBytes(NativeConstants.
on-wire data type type,from byte array b, int starting index of b offset, int number of bytes to be written len)Write len bytes from given byte array into internal buffer. |
| public void | writeInteger(NativeConstants.
value l)Write data according to provided Integer type. |
| byteBuffer | back to summary |
|---|---|
| private byte[] byteBuffer | |
| MAX_BYTES_TO_DUMP | back to summary |
|---|---|
| pack-priv static final int MAX_BYTES_TO_DUMP | |
| NO_LENGTH_LIMIT | back to summary |
|---|---|
| pack-priv static final int NO_LENGTH_LIMIT | |
| NULL_LENGTH | back to summary |
|---|---|
| public static final long NULL_LENGTH | |
| payloadLength | back to summary |
|---|---|
| private int payloadLength | |
| position | back to summary |
|---|---|
| private int position | |
| tags | back to summary |
|---|---|
| private Map<String, Integer> tags | |
| TYPE_ID_AUTH_MORE_DATA | back to summary |
|---|---|
| public static final short TYPE_ID_AUTH_MORE_DATA | |
| TYPE_ID_AUTH_NEXT_FACTOR | back to summary |
|---|---|
| public static final short TYPE_ID_AUTH_NEXT_FACTOR | |
| TYPE_ID_AUTH_SWITCH | back to summary |
|---|---|
| public static final short TYPE_ID_AUTH_SWITCH It has the same signature as EOF, but may be issued by server only during handshake phase | |
| TYPE_ID_EOF | back to summary |
|---|---|
| public static final short TYPE_ID_EOF | |
| TYPE_ID_ERROR | back to summary |
|---|---|
| public static final short TYPE_ID_ERROR | |
| TYPE_ID_LOCAL_INFILE | back to summary |
|---|---|
| public static final short TYPE_ID_LOCAL_INFILE | |
| TYPE_ID_OK | back to summary |
|---|---|
| public static final short TYPE_ID_OK | |
| NativePacketPayload | back to summary |
|---|---|
| public NativePacketPayload(byte[] buf) | |
| NativePacketPayload | back to summary |
|---|---|
| public NativePacketPayload(int size) | |
| adjustPayloadLength | back to summary |
|---|---|
| private void adjustPayloadLength() To be called after write operations to ensure that payloadLength contains the real size of written data. | |
| ensureCapacity | back to summary |
|---|---|
| public final void ensureCapacity(int additionalData) Checks that underlying buffer has enough space to store additionalData bytes starting from current position. If buffer size is smaller than required then it is re-allocated with bigger size.
| |
| extractSqlFromPacket | back to summary |
|---|---|
| public static String extractSqlFromPacket(String possibleSqlQuery, NativePacketPayload packet, int endOfQueryPacketPosition, int maxQuerySizeToLog) | |
| getByteBuffer | back to summary |
|---|---|
| public byte[] getByteBuffer() Implements com. Doc from com. Returns the array of bytes this Buffer is using to read from.
| |
| getCapacity | back to summary |
|---|---|
| public int getCapacity() | |
| getPayloadLength | back to summary |
|---|---|
| public int getPayloadLength() Get the actual length of payload the buffer contains. It can be smaller than underlying buffer size because it can be reused after a big packet.
| |
| getPosition | back to summary |
|---|---|
| public int getPosition() Implements com. Doc from com. Returns the current position to write to/ read from
| |
| getTag | back to summary |
|---|---|
| public int getTag(String key) Gets the value of the position tag for the given key.
| |
| isAuthMethodSwitchRequestPacket | back to summary |
|---|---|
| public final boolean isAuthMethodSwitchRequestPacket() Is it a Protocol::AuthSwitchRequest packet. See https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase_packets_protocol_auth_switch_request.html
| |
| isAuthMoreDataPacket | back to summary |
|---|---|
| public final boolean isAuthMoreDataPacket() Is it a Protocol::AuthMoreData packet. See https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase_packets_protocol_auth_more_data.html
| |
| isAuthNextFactorPacket | back to summary |
|---|---|
| public final boolean isAuthNextFactorPacket() Is it a Protocol::AuthNextFactor packet. See https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase_packets_protocol_auth_next_factor_request.html
| |
| isEOFPacket | back to summary |
|---|---|
| public final boolean isEOFPacket() Is it a EOF packet. See https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_basic_eof_packet.html
| |
| isErrorPacket | back to summary |
|---|---|
| public boolean isErrorPacket() Is it a ERROR packet.
| |
| isOKPacket | back to summary |
|---|---|
| public final boolean isOKPacket() Is it an OK packet. See https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_basic_ok_packet.html
| |
| isResultSetOKPacket | back to summary |
|---|---|
| public final boolean isResultSetOKPacket() Is it an OK packet for ResultSet. Unlike usual 0x00 signature it has 0xfe signature. See https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_basic_ok_packet.html
| |
| readBytes | back to summary |
|---|---|
| public byte[] readBytes(NativeConstants. Read bytes from internal buffer starting from current position into the new byte array.
The length of data to read depends on
| |
| readBytes | back to summary |
|---|---|
| public byte[] readBytes(NativeConstants. Read len bytes from internal buffer starting from current position into the new byte array.
| |
| readInteger | back to summary |
|---|---|
| public final long readInteger(NativeConstants. Read data according to provided Integer type.
| |
| readString | back to summary |
|---|---|
| public String readString(NativeConstants. Read bytes from internal buffer starting from current position decoding them into String using the specified character encoding.
The length of data to read depends on
| |
| readString | back to summary |
|---|---|
| public String readString(NativeConstants. Read len bytes from internal buffer starting from current position decoding them into String using the specified character encoding.
| |
| setByteBuffer | back to summary |
|---|---|
| public void setByteBuffer(byte[] byteBufferToSet) Sets the array of bytes to use as a buffer to read from.
| |
| setPayloadLength | back to summary |
|---|---|
| public void setPayloadLength(int bufLengthToSet) Set the actual length of payload written to buffer. It can be smaller or equal to underlying buffer size.
| |
| setPosition | back to summary |
|---|---|
| public void setPosition(int positionToSet) Set the current position to write to/ read from
| |
| setTag | back to summary |
|---|---|
| public int setTag(String key) Tag current position with the given key for future reference.
| |
| skipBytes | back to summary |
|---|---|
| public void skipBytes(NativeConstants. Set position to next value in internal buffer skipping the current value according to
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| toSuperString | back to summary |
|---|---|
| public String toSuperString() | |
| writeBytes | back to summary |
|---|---|
| public final void writeBytes(NativeConstants. Write all bytes from given byte array into internal buffer starting with current buffer position.
| |
| writeBytes | back to summary |
|---|---|
| public final void writeBytes(NativeConstants. Write all bytes from given byte array into internal buffer starting with current buffer position.
| |
| writeBytes | back to summary |
|---|---|
| public void writeBytes(NativeConstants. Write len bytes from given byte array into internal buffer. Read starts from given offset, write starts with current buffer position.
| |
| writeBytes | back to summary |
|---|---|
| public void writeBytes(NativeConstants. Write len bytes from given byte array into internal buffer. Read starts from given offset, write starts with current buffer position.
| |
| writeInteger | back to summary |
|---|---|
| public void writeInteger(NativeConstants. Write data according to provided Integer type.
| |