public final class Encode extends Object
ByteBuffer and a value and write the encoded value to the given buffer.| Modifier and Type | Field and Description |
|---|---|
static int |
U_SHORT_MAX_VALUE |
| Modifier and Type | Method and Description |
|---|---|
static void |
asByte(io.netty.buffer.ByteBuf buffer,
byte value)
Encode a byte.
|
static void |
asByte(io.netty.buffer.ByteBuf buffer,
int value)
Encode a byte.
|
static void |
asDouble(io.netty.buffer.ByteBuf buffer,
double value)
Encode a double.
|
static void |
asFloat(io.netty.buffer.ByteBuf buffer,
float value)
Encode a float.
|
static void |
asInt(io.netty.buffer.ByteBuf buffer,
int value)
Encode integer number.
|
static void |
asLong(io.netty.buffer.ByteBuf buffer,
int value)
Encode long number.
|
static void |
bigint(io.netty.buffer.ByteBuf buffer,
long value)
Encode long number.
|
static void |
bit(io.netty.buffer.ByteBuf buffer,
boolean value)
Encode a bit.
|
static void |
dword(io.netty.buffer.ByteBuf buffer,
int value)
Encode a double word.
|
static void |
intBigEndian(io.netty.buffer.ByteBuf buffer,
int value)
Encode an integer with big endian encoding.
|
static void |
money(io.netty.buffer.ByteBuf buffer,
BigInteger value)
Encode an unscaled
BigInteger value. |
static void |
rpcString(io.netty.buffer.ByteBuf buffer,
CharSequence value)
Encode a
CharSequence as RPC string using UNICODE encoding. |
static void |
rpcString(io.netty.buffer.ByteBuf buffer,
CharSequence value,
Charset charset)
Encode a
CharSequence as RPC string using Charset encoding. |
static void |
shortBE(io.netty.buffer.ByteBuf buffer,
short value)
Encode a short big endian.
|
static void |
smallInt(io.netty.buffer.ByteBuf buffer,
int value)
Encode short number.
|
static void |
smallInt(io.netty.buffer.ByteBuf buffer,
short value)
Encode short number.
|
static void |
smallMoney(io.netty.buffer.ByteBuf buffer,
BigInteger value)
Encode an unscaled
BigInteger value. |
static void |
tinyInt(io.netty.buffer.ByteBuf buffer,
byte value)
Encode byte number.
|
static void |
uLongLong(io.netty.buffer.ByteBuf buffer,
long value)
Encode unsigned long number.
|
static void |
unicodeStream(io.netty.buffer.ByteBuf buffer,
String value)
Encode a
String as unicode. |
static void |
uShort(io.netty.buffer.ByteBuf buffer,
int value)
Encode a unsigned short.
|
static void |
uShortBE(io.netty.buffer.ByteBuf buffer,
int value)
Encode a short (ushort) big endian.
|
static void |
uString(io.netty.buffer.ByteBuf buffer,
String value,
Charset charset)
Encode a string.
|
public static void asByte(io.netty.buffer.ByteBuf buffer,
int value)
BYTE.buffer - the data buffer.value - the value to encode.public static void asByte(io.netty.buffer.ByteBuf buffer,
byte value)
BYTE.buffer - the data buffer.value - the value to encode.public static void asFloat(io.netty.buffer.ByteBuf buffer,
float value)
REAL.buffer - the data buffer.value - the value to encode.public static void asDouble(io.netty.buffer.ByteBuf buffer,
double value)
FLOAT.buffer - the data buffer.value - the value to encode.public static void dword(io.netty.buffer.ByteBuf buffer,
int value)
DWORD.buffer - the data buffer.value - the value to encode.public static void asLong(io.netty.buffer.ByteBuf buffer,
int value)
LONG.buffer - the data buffer.value - the value to encode.public static void smallMoney(io.netty.buffer.ByteBuf buffer,
BigInteger value)
BigInteger value. SQL server type SMALLMONEY.buffer - the data buffer.value - the value to encode.public static void money(io.netty.buffer.ByteBuf buffer,
BigInteger value)
BigInteger value. SQL server type MONEY.buffer - the data buffer.value - the value to encode.public static void bit(io.netty.buffer.ByteBuf buffer,
boolean value)
BIT.buffer - the data buffer.value - the value to encode.public static void tinyInt(io.netty.buffer.ByteBuf buffer,
byte value)
TINYINT.buffer - the data buffer.value - the value to encode.public static void smallInt(io.netty.buffer.ByteBuf buffer,
short value)
SMALLINT.buffer - the data buffer.value - the value to encode.public static void smallInt(io.netty.buffer.ByteBuf buffer,
int value)
SMALLINT.buffer - the data buffer.value - the value to encode.public static void asInt(io.netty.buffer.ByteBuf buffer,
int value)
INT.buffer - the data buffer.value - the value to encode.public static void bigint(io.netty.buffer.ByteBuf buffer,
long value)
BIGINT.buffer - the data buffer.value - the value to encode.public static void uLongLong(io.netty.buffer.ByteBuf buffer,
long value)
LONGLONG.buffer - the data buffer.value - the value to encode.public static void uShort(io.netty.buffer.ByteBuf buffer,
int value)
USHORT.buffer - the data buffer.value - the value to encode.public static void intBigEndian(io.netty.buffer.ByteBuf buffer,
int value)
buffer - the data buffer.value - the value to encode.public static void shortBE(io.netty.buffer.ByteBuf buffer,
short value)
buffer - the data buffer.value - the value to encode.public static void uShortBE(io.netty.buffer.ByteBuf buffer,
int value)
buffer - the data buffer.value - the value to encode.public static void uString(io.netty.buffer.ByteBuf buffer,
String value,
Charset charset)
VARCHAR/NVARCHAR.buffer - the data buffer.value - the value to encode.charset - the charset to use.public static void unicodeStream(io.netty.buffer.ByteBuf buffer,
String value)
String as unicode. SQL server type UNICODESTREAM.buffer - the data buffer.value - the value to encode.public static void rpcString(io.netty.buffer.ByteBuf buffer,
CharSequence value)
CharSequence as RPC string using UNICODE encoding.buffer - the data buffer.value - the value to encode.public static void rpcString(io.netty.buffer.ByteBuf buffer,
CharSequence value,
Charset charset)
CharSequence as RPC string using Charset encoding.buffer - the data buffer.value - the value to encode.charset - the encoding to use.Copyright © 2023. All rights reserved.