类 NativeUtils
- java.lang.Object
-
- com.mysql.cj.protocol.a.NativeUtils
-
public class NativeUtils extends Object
Utilities to manipulate MySQL protocol-specific formats.
-
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static intdecodeMysqlThreeByteInteger(byte[] b)static intdecodeMysqlThreeByteInteger(byte[] b, int offset)static byte[]encodeMysqlThreeByteInteger(int i)static voidencodeMysqlThreeByteInteger(int i, byte[] b, int offset)static intgetBinaryEncodedLength(int type)Get the length of a binary-encoded value of the given type.
-
-
-
方法详细资料
-
encodeMysqlThreeByteInteger
public static byte[] encodeMysqlThreeByteInteger(int i)
-
encodeMysqlThreeByteInteger
public static void encodeMysqlThreeByteInteger(int i, byte[] b, int offset)
-
decodeMysqlThreeByteInteger
public static int decodeMysqlThreeByteInteger(byte[] b)
-
decodeMysqlThreeByteInteger
public static int decodeMysqlThreeByteInteger(byte[] b, int offset)
-
getBinaryEncodedLength
public static int getBinaryEncodedLength(int type)
Get the length of a binary-encoded value of the given type.- 参数:
type- type- 返回:
- the length (>0), 0 for a length-prefixed type, or -1 for unknown
-
-