Top Description Constructors Methods
com.mysql.cj.protocol.a

public Class NativeUtils

extends Object
Class Inheritance
Imports
com.mysql.cj.MysqlType

Utilities to manipulate MySQL protocol-specific formats.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static int
public static int
decodeMysqlThreeByteInteger(byte[] b, int offset)

public static byte[]
public static void
encodeMysqlThreeByteInteger(int i, byte[] b, int offset)

public static int

Returns:

the length (>0), 0 for a length-prefixed type, or -1 for unknown
getBinaryEncodedLength
(int
type
type
)

Get the length of a binary-encoded value of the given type.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NativeUtilsback to summary
private NativeUtils()

Method Detail

decodeMysqlThreeByteIntegerback to summary
public static int decodeMysqlThreeByteInteger(byte[] b)
decodeMysqlThreeByteIntegerback to summary
public static int decodeMysqlThreeByteInteger(byte[] b, int offset)
encodeMysqlThreeByteIntegerback to summary
public static byte[] encodeMysqlThreeByteInteger(int i)
encodeMysqlThreeByteIntegerback to summary
public static void encodeMysqlThreeByteInteger(int i, byte[] b, int offset)
getBinaryEncodedLengthback to summary
public static int getBinaryEncodedLength(int type)

Get the length of a binary-encoded value of the given type.

Parameters
type:int

type

Returns:int

the length (>0), 0 for a length-prefixed type, or -1 for unknown