| Constructor and Description |
|---|
BBDecoder() |
| Modifier and Type | Method and Description |
|---|---|
protected byte |
doGet() |
protected void |
doGet(byte[] bytes) |
protected byte |
get() |
protected void |
get(byte[] bytes) |
protected Binary |
get(int size) |
boolean |
hasRemaining()
Tells whether there are any remaining byte(s) to be read.
|
void |
init(ByteBuffer in) |
List<Object> |
readArray()
An array is an ordered sequence of values of the same type.
|
byte[] |
readBin128()
The bin128 type consists of 16 consecutive octets of opaque binary data.
|
RangeSet |
readByteRanges() |
byte[] |
readBytes(int howManyBytes)
Reads the given number of bytes.
|
String |
readContent() |
long |
readDatetime()
The datetime type encodes a date and time using the 64 bit POSIX time_t format.
|
double |
readDouble()
The double type encodes a double precision 64-bit floating point number.
|
float |
readFloat()
The float type encodes a single precision 32-bit floating point number.
|
short |
readInt16()
The int16 type is a signed integral value encoded using a 16-bit two's complement representation in network byte order.
|
int |
readInt32()
The int32 type is a signed integral value encoded using a 32-bit two's complement representation in network byte order.
|
long |
readInt64()
The int64 type is a signed integral value encoded using a 64-bit two's complement representation in network byte order.
|
byte |
readInt8()
The int8 type is a signed integral value encoded using an 8-bit two's complement representation.
|
List<Object> |
readList()
A list is an ordered sequence of (type, value) pairs.
|
Map<String,Object> |
readMap()
A map is a set of distinct keys where each key has an associated (type,value) pair.
|
byte[] |
readReaminingBytes()
Reads the remaining bytes on the underlying buffer.
|
int |
readSequenceNo()
// *The sequence-no type encodes, in network byte order, a serial number as defined in RFC-1982.
|
RangeSet |
readSequenceSet() |
String |
readStr16()
The str16 type encodes up to 65535 octets worth of UTF-8 unicode.
|
String |
readStr8()
The str8 type encodes up to 255 octets worth of UTF-8 unicode.
|
Struct |
readStruct(int type) |
Struct |
readStruct32()
The struct32 type describes any coded struct with a 32-bit (4 octet) size.
|
int |
readUint16()
The uint16 type is a 16-bit unsigned integral value encoded in network byte order.
|
long |
readUint32()
The uint32 type is a 32-bit unsigned integral value encoded in network byte order.
|
long |
readUint64()
The uint64 type is a 64-bit unsigned integral value encoded in network byte order.
|
short |
readUint8()
The uint8 type is an 8-bit unsigned integral value.
|
UUID |
readUuid()
The uuid type encodes a universally unique id as defined by RFC-4122.
|
byte[] |
readVbin16()
The vbin16 type encodes up to 65535 octets of opaque binary data.
|
byte[] |
readVbin32()
The vbin32 type encodes up to 4294967295 octets of opaque binary data.
|
byte[] |
readVbin8()
The vbin8 type encodes up to 255 octets of opaque binary data.
|
void |
releaseBuffer() |
protected short |
uget() |
public void init(ByteBuffer in)
public void releaseBuffer()
protected byte doGet()
protected void doGet(byte[] bytes)
protected Binary get(int size)
public boolean hasRemaining()
Decoderpublic short readUint8()
Decoderpublic int readUint16()
DecoderreadUint16 in interface Decoderpublic long readUint32()
DecoderreadUint32 in interface Decoderpublic long readUint64()
DecoderreadUint64 in interface Decoderpublic byte[] readBin128()
Decoderpublic byte[] readBytes(int howManyBytes)
DecoderhowManyBytes - how many bytes need to be read?public double readDouble()
Decoderpublic float readFloat()
Decoderpublic short readInt16()
Decoderpublic int readInt32()
Decoderpublic byte readInt8()
Decoderpublic byte[] readReaminingBytes()
Decoderpublic long readInt64()
Decoderprotected byte get()
protected void get(byte[] bytes)
protected short uget()
public int readSequenceNo()
DecoderreadSequenceNo in interface Decoderpublic long readDatetime()
DecoderreadDatetime in interface Decoderpublic String readStr8()
Decoderpublic String readStr16()
Decoderpublic byte[] readVbin8()
Decoderpublic byte[] readVbin16()
DecoderreadVbin16 in interface Decoderpublic byte[] readVbin32()
DecoderreadVbin32 in interface Decoderpublic RangeSet readSequenceSet()
readSequenceSet in interface Decoderpublic RangeSet readByteRanges()
readByteRanges in interface Decoderpublic UUID readUuid()
Decoderpublic String readContent()
public Struct readStruct(int type)
readStruct in interface Decodertype - the type of the struct.public Struct readStruct32()
DecoderreadStruct32 in interface Decoderpublic Map<String,Object> readMap()
Decoderpublic List<Object> readList()
Decoderpublic List<Object> readArray()
DecoderCopyright © 2006–2015 The Apache Software Foundation. All rights reserved.