public interface Decoder
Modifier and Type | Method and Description |
---|---|
boolean |
hasRemaining()
Tells whether there are any remaining byte(s) to be read.
|
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.
|
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[] |
readRemainingBytes()
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.
|
boolean hasRemaining()
short readUint8()
int readUint16()
long readUint32()
long readUint64()
long readDatetime()
UUID readUuid()
int readSequenceNo()
RangeSet readSequenceSet()
RangeSet readByteRanges()
String readStr8()
String readStr16()
byte[] readVbin8()
byte[] readVbin16()
byte[] readVbin32()
Struct readStruct32()
Map<String,Object> readMap()
List<Object> readList()
List<Object> readArray()
Struct readStruct(int type)
type
- the type of the struct.float readFloat()
double readDouble()
byte readInt8()
short readInt16()
int readInt32()
long readInt64()
byte[] readBin128()
byte[] readRemainingBytes()
byte[] readBytes(int howManyBytes)
howManyBytes
- how many bytes need to be read?Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.