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
Decoder
decodeSignedShort
in interface Decoder
Exception
- if an error occurs during decodingpublic short decodeUnsignedShort() throws Exception
Decoder
decodeUnsignedShort
in interface Decoder
Exception
- if an error occurs during decodingpublic short decode16() throws Exception
Decoder
public int decodeSignedInt() throws Exception
Decoder
decodeSignedInt
in interface Decoder
Exception
- if an error occurs during decodingpublic int decodeUnsignedInt() throws Exception
Decoder
decodeUnsignedInt
in interface Decoder
Exception
- if an error occurs during decodingpublic int decode32() throws Exception
Decoder
public long decodeUnsignedLong() throws Exception
Decoder
decodeUnsignedLong
in interface Decoder
Exception
- if an error occurs during decodingpublic long decodeSignedLong() throws Exception
Decoder
decodeSignedLong
in interface Decoder
Exception
- if an error occurs during decodingpublic long decode64() throws Exception
Decoder
public String decodeNullableString() throws Exception
Decoder
decodeNullableString
in interface Decoder
Exception
- if an error occurs during decodingpublic String decodeString() throws Exception
Decoder
decodeString
in interface Decoder
Exception
- if an error occurs during decodingpublic String decodeString(int length) throws Exception
Decoder
decodeString
in interface Decoder
length
- the length of the stringException
- if an error occurs during decodingpublic byte decodeByte() throws Exception
Decoder
decodeByte
in interface Decoder
Exception
- if an error occurs during decodingpublic byte[] decodeNullableByteArray() throws Exception
Decoder
decodeNullableByteArray
in interface Decoder
Exception
- if an error occurs during decodingpublic byte[] decodeByteArray() throws Exception
Decoder
decodeByteArray
in interface Decoder
Exception
- if an error occurs during decodingpublic byte[] decodeByteArray(int length) throws Exception
Decoder
decodeByteArray
in interface Decoder
length
- the length of the arrayException
- if an error occurs during decodingpublic boolean decodeBoolean() throws Exception
Decoder
decodeBoolean
in interface Decoder
Exception
- if an error occurs during decodingpublic float decodeFloat() throws Exception
Decoder
decodeFloat
in interface Decoder
Exception
- if an error occurs during decodingpublic double decodeDouble() throws Exception
Decoder
decodeDouble
in interface Decoder
Exception
- if an error occurs during decodingCopyright © 2021 ScalAgent D.T.. All rights reserved.