public final class Decode extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte |
asByte(io.netty.buffer.ByteBuf buffer)
Decode a byte.
|
static double |
asDouble(io.netty.buffer.ByteBuf buffer)
Decode double number.
|
static float |
asFloat(io.netty.buffer.ByteBuf buffer)
Decode float number.
|
static int |
asInt(io.netty.buffer.ByteBuf buffer)
Decode integer number.
|
static int |
asLong(io.netty.buffer.ByteBuf buffer)
Decode long number.
|
static long |
bigint(io.netty.buffer.ByteBuf buffer)
Decode long number.
|
static byte |
bit(io.netty.buffer.ByteBuf buffer)
Decode byte number.
|
static long |
dword(io.netty.buffer.ByteBuf buffer)
Decode a double word.
|
static int |
intBigEndian(io.netty.buffer.ByteBuf buffer)
Read an integer with big endian encoding.
|
static Integer |
peekUShort(io.netty.buffer.ByteBuf buffer)
Peek onto the next
uShort(ByteBuf). |
static short |
smallInt(io.netty.buffer.ByteBuf buffer)
Decode short number.
|
static byte |
tinyInt(io.netty.buffer.ByteBuf buffer)
Decode byte number.
|
static int |
uByte(io.netty.buffer.ByteBuf buffer)
Decode an unsigned byte.
|
static long |
uLongLong(io.netty.buffer.ByteBuf buffer)
Decode unsigned long number.
|
static String |
unicodeBString(io.netty.buffer.ByteBuf buffer)
Decode a unicode (
VARCHAR) string from ByteBuf with byte length. |
static String |
unicodeUString(io.netty.buffer.ByteBuf buffer)
Decode a unicode (
VARCHAR) string from ByteBuf with unsigned short length. |
static int |
uShort(io.netty.buffer.ByteBuf buffer)
Decode a unsigned short.
|
public static byte asByte(io.netty.buffer.ByteBuf buffer)
BYTE.buffer - the data buffer.BYTE.public static int uByte(io.netty.buffer.ByteBuf buffer)
BYTEbuffer - the data buffer.BYTE.public static long dword(io.netty.buffer.ByteBuf buffer)
DWORD.buffer - the data buffer.DWORD.public static byte bit(io.netty.buffer.ByteBuf buffer)
BIT.buffer - the data buffer.BIT.public static float asFloat(io.netty.buffer.ByteBuf buffer)
REAL.buffer - the data buffer.REAL.public static double asDouble(io.netty.buffer.ByteBuf buffer)
FLOAT.buffer - the data buffer.FLOAT.public static byte tinyInt(io.netty.buffer.ByteBuf buffer)
TINYINT.buffer - the data buffer.TINYINT.public static short smallInt(io.netty.buffer.ByteBuf buffer)
SMALLINT.buffer - the data buffer.SMALLINT.public static int asInt(io.netty.buffer.ByteBuf buffer)
INT.buffer - the data buffer.INT.public static long bigint(io.netty.buffer.ByteBuf buffer)
BIGINT.buffer - the data buffer.BIGINT.public static int asLong(io.netty.buffer.ByteBuf buffer)
LONG.buffer - the data buffer.LONG.public static long uLongLong(io.netty.buffer.ByteBuf buffer)
LONGLONG.buffer - the data buffer.LONGLONG.public static int uShort(io.netty.buffer.ByteBuf buffer)
USHORT.buffer - the data buffer.USHORT.@Nullable public static Integer peekUShort(io.netty.buffer.ByteBuf buffer)
uShort(ByteBuf). This method retains the ByteBuf.readerIndex() and returns the USHORT value if it is readable (i.e. if the buffer has at least two
readable bytes). Returns null if not readable.buffer - the data buffer.USHORT value or null.public static int intBigEndian(io.netty.buffer.ByteBuf buffer)
buffer - the data buffer.public static String unicodeUString(io.netty.buffer.ByteBuf buffer)
VARCHAR) string from ByteBuf with unsigned short length.buffer - the data buffer.String.Copyright © 2023. All rights reserved.