| Modifier and Type | Field and Description |
|---|---|
private ByteBuffer |
buf |
| Constructor and Description |
|---|
ByteBufferDecoder(ByteBuffer buf) |
| Modifier and Type | Method and Description |
|---|---|
short |
decode16()
Decodes a signed short integer.
|
int |
decode32()
Decodes a signed integer.
|
long |
decode64()
Decodes a signed long integer.
|
boolean |
decodeBoolean()
Decodes a boolean.
|
byte |
decodeByte()
Decodes a byte.
|
byte[] |
decodeByteArray()
Decodes a byte array that cannot be null.
|
byte[] |
decodeByteArray(int length)
Decodes a byte array that cannot be null.
|
double |
decodeDouble()
Decodes a double.
|
float |
decodeFloat()
Decodes a float.
|
byte[] |
decodeNullableByteArray()
Decodes a byte array that can be null.
|
String |
decodeNullableString()
Decodes a string that can be null.
|
int |
decodeSignedInt()
Decodes a signed integer.
|
long |
decodeSignedLong()
Decodes a signed long integer.
|
short |
decodeSignedShort()
Decodes a signed short integer.
|
String |
decodeString()
Decodes a string that cannot be null.
|
String |
decodeString(int length)
Decodes a string that cannot be null.
|
int |
decodeUnsignedInt()
Decodes an unsigned integer.
|
long |
decodeUnsignedLong()
Decodes an unsigned long integer.
|
short |
decodeUnsignedShort()
Decodes an unsigned short integer.
|
private boolean |
isNull() |
private ByteBuffer buf
public ByteBufferDecoder(ByteBuffer buf)
public short decodeSignedShort()
throws Exception
DecoderdecodeSignedShort in interface DecoderException - if an error occurs during decodingpublic short decodeUnsignedShort()
throws Exception
DecoderdecodeUnsignedShort in interface DecoderException - if an error occurs during decodingpublic short decode16()
throws Exception
Decoderpublic int decodeSignedInt()
throws Exception
DecoderdecodeSignedInt in interface DecoderException - if an error occurs during decodingpublic int decodeUnsignedInt()
throws Exception
DecoderdecodeUnsignedInt in interface DecoderException - if an error occurs during decodingpublic int decode32()
throws Exception
Decoderpublic long decodeUnsignedLong()
throws Exception
DecoderdecodeUnsignedLong in interface DecoderException - if an error occurs during decodingpublic long decodeSignedLong()
throws Exception
DecoderdecodeSignedLong in interface DecoderException - if an error occurs during decodingpublic long decode64()
throws Exception
Decoderpublic String decodeNullableString() throws Exception
DecoderdecodeNullableString in interface DecoderException - if an error occurs during decodingpublic String decodeString() throws Exception
DecoderdecodeString in interface DecoderException - if an error occurs during decodingpublic String decodeString(int length) throws Exception
DecoderdecodeString in interface Decoderlength - the length of the stringException - if an error occurs during decodingpublic byte decodeByte()
throws Exception
DecoderdecodeByte in interface DecoderException - if an error occurs during decodingpublic byte[] decodeNullableByteArray()
throws Exception
DecoderdecodeNullableByteArray in interface DecoderException - if an error occurs during decodingpublic byte[] decodeByteArray()
throws Exception
DecoderdecodeByteArray in interface DecoderException - if an error occurs during decodingpublic byte[] decodeByteArray(int length)
throws Exception
DecoderdecodeByteArray in interface Decoderlength - the length of the arrayException - if an error occurs during decodingpublic boolean decodeBoolean()
throws Exception
DecoderdecodeBoolean in interface DecoderException - if an error occurs during decodingpublic float decodeFloat()
throws Exception
DecoderdecodeFloat in interface DecoderException - if an error occurs during decodingpublic double decodeDouble()
throws Exception
DecoderdecodeDouble in interface DecoderException - if an error occurs during decodingCopyright © 2022 ScalAgent D.T.. All rights reserved.