Package org.mariadb.r2dbc.util
Class BufferUtils
- java.lang.Object
-
- org.mariadb.r2dbc.util.BufferUtils
-
public final class BufferUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static byte[]BINARY_PREFIXstatic byte[]STRING_PREFIX
-
Constructor Summary
Constructors Constructor Description BufferUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.netty.buffer.ByteBufencodeAscii(io.netty.buffer.ByteBufAllocator allocator, String value)static io.netty.buffer.ByteBufencodeByte(io.netty.buffer.ByteBufAllocator allocator, int value)static io.netty.buffer.ByteBufencodeEscapedBuffer(io.netty.buffer.ByteBufAllocator allocator, io.netty.buffer.ByteBuf value, Context context)static io.netty.buffer.ByteBufencodeEscapedBytes(io.netty.buffer.ByteBufAllocator allocator, byte[] prefix, byte[] value, Context context)static byte[]encodeLength(int length)static io.netty.buffer.ByteBufencodeLengthAscii(io.netty.buffer.ByteBufAllocator allocator, String value)static io.netty.buffer.ByteBufencodeLengthBytes(io.netty.buffer.ByteBufAllocator allocator, byte[] value)static io.netty.buffer.ByteBufencodeLengthUtf8(io.netty.buffer.ByteBufAllocator allocator, String value)static voidescapedBytes(io.netty.buffer.ByteBuf buf, byte[] value, int len, Context context)static io.netty.buffer.ByteBufreadLengthEncodedBuffer(io.netty.buffer.ByteBuf buf)static longreadLengthEncodedInt(io.netty.buffer.ByteBuf buf)static StringreadLengthEncodedString(io.netty.buffer.ByteBuf buf)static voidskipLengthEncode(io.netty.buffer.ByteBuf buf)static StringtoString(io.netty.buffer.ByteBuf packet)static voidwriteLengthEncode(String val, io.netty.buffer.ByteBuf buf)
-
-
-
Method Detail
-
skipLengthEncode
public static void skipLengthEncode(io.netty.buffer.ByteBuf buf)
-
readLengthEncodedInt
public static long readLengthEncodedInt(io.netty.buffer.ByteBuf buf)
-
readLengthEncodedString
public static String readLengthEncodedString(io.netty.buffer.ByteBuf buf)
-
readLengthEncodedBuffer
public static io.netty.buffer.ByteBuf readLengthEncodedBuffer(io.netty.buffer.ByteBuf buf)
-
encodeLength
public static byte[] encodeLength(int length)
-
writeLengthEncode
public static void writeLengthEncode(String val, io.netty.buffer.ByteBuf buf)
-
encodeByte
public static io.netty.buffer.ByteBuf encodeByte(io.netty.buffer.ByteBufAllocator allocator, int value)
-
encodeAscii
public static io.netty.buffer.ByteBuf encodeAscii(io.netty.buffer.ByteBufAllocator allocator, String value)
-
encodeLengthAscii
public static io.netty.buffer.ByteBuf encodeLengthAscii(io.netty.buffer.ByteBufAllocator allocator, String value)
-
encodeLengthUtf8
public static io.netty.buffer.ByteBuf encodeLengthUtf8(io.netty.buffer.ByteBufAllocator allocator, String value)
-
encodeLengthBytes
public static io.netty.buffer.ByteBuf encodeLengthBytes(io.netty.buffer.ByteBufAllocator allocator, byte[] value)
-
encodeEscapedBuffer
public static io.netty.buffer.ByteBuf encodeEscapedBuffer(io.netty.buffer.ByteBufAllocator allocator, io.netty.buffer.ByteBuf value, Context context)
-
encodeEscapedBytes
public static io.netty.buffer.ByteBuf encodeEscapedBytes(io.netty.buffer.ByteBufAllocator allocator, byte[] prefix, byte[] value, Context context)
-
escapedBytes
public static void escapedBytes(io.netty.buffer.ByteBuf buf, byte[] value, int len, Context context)
-
toString
public static String toString(io.netty.buffer.ByteBuf packet)
-
-