public interface Encoder
| Modifier and Type | Method and Description |
|---|---|
void |
init() |
int |
position() |
void |
writeArray(List<Object> array)
An array is an ordered sequence of values of the same type.
|
void |
writeBin128(byte[] bytes)
The bin128 type consists of 16 consecutive octets of opaque binary data.
|
void |
writeByteRanges(RangeSet ranges) |
void |
writeDatetime(long l)
The datetime type encodes a date and time using the 64 bit POSIX time_t format.
|
void |
writeDouble(double aDouble)
The double type encodes a double precision 64-bit floating point number.
|
void |
writeFloat(float aFloat)
The float type encodes a single precision 32-bit floating point number.
|
void |
writeInt16(short aShort)
The int16 type is a signed integral value encoded using a 16-bit two's complement representation in network byte order.
|
void |
writeInt32(int anInt)
The int32 type is a signed integral value encoded using a 32-bit two's complement representation in network byte order.
|
void |
writeInt64(long aLong)
The int64 type is a signed integral value encoded using a 64-bit two's complement representation in network byte order.
|
void |
writeInt8(byte aByte)
The int8 type is a signed integral value encoded using an 8-bit two's complement representation.
|
void |
writeList(List<Object> list)
A list is an ordered sequence of (type, value) pairs.
|
void |
writeMap(Map<String,Object> map)
A map is a set of distinct keys where each key has an associated (type,value) pair.
|
void |
writeSequenceNo(int s)
The sequence-no type encodes, in network byte order, a serial number as defined in RFC-1982.
|
void |
writeSequenceSet(RangeSet ranges) |
void |
writeStr16(String s)
The str16 type encodes up to 65535 octets worth of UTF-8 unicode.
|
void |
writeStr8(String s)
The str8 type encodes up to 255 octets worth of UTF-8 unicode.
|
void |
writeStruct(int type,
Struct struct)
The struct32 type describes any coded struct with a 32-bit (4 octet) size.
|
void |
writeStruct32(Struct struct)
The struct32 type describes any coded struct with a 32-bit (4 octet) size.
|
void |
writeUint16(int s)
The uint16 type is a 16-bit unsigned integral value encoded in network byte order.
|
void |
writeUint32(long i)
The uint32 type is a 32-bit unsigned integral value encoded in network byte order.
|
void |
writeUint64(long l)
The uint64 type is a 64-bit unsigned integral value encoded in network byte order.
|
void |
writeUint8(short b)
The uint8 type is an 8-bit unsigned integral value.
|
void |
writeUuid(UUID uuid)
The uuid type encodes a universally unique id as defined by RFC-4122.
|
void |
writeVbin16(byte[] bytes)
The vbin16 type encodes up to 65535 octets of opaque binary data.
|
void |
writeVbin32(byte[] bytes)
The vbin32 type encodes up to 4294967295 octets of opaque binary data.
|
void |
writeVbin8(byte[] bytes)
The vbin8 type encodes up to 255 octets of opaque binary data.
|
void writeUint8(short b)
b - the unsigned integer to be encoded.void writeUint16(int s)
s - the unsigned integer to be encoded.void writeUint32(long i)
i - the unsigned integer to be encoded.void writeUint64(long l)
l - the unsigned integer to be encoded.void writeDatetime(long l)
l - the datetime (as long) to be encoded.void writeUuid(UUID uuid)
uuid - the uuid to be encoded.void writeSequenceNo(int s)
s - the sequence number to be encoded.void writeSequenceSet(RangeSet ranges)
void writeByteRanges(RangeSet ranges)
void writeStr8(String s)
s - the string to be encoded.void writeStr16(String s)
s - the string to be encoded.void writeVbin8(byte[] bytes)
bytes - the byte array to be encoded.void writeVbin16(byte[] bytes)
bytes - the byte array to be encoded.void writeVbin32(byte[] bytes)
bytes - the byte array to be encoded.void writeStruct32(Struct struct)
struct - the struct to be encoded.void writeMap(Map<String,Object> map)
map - the map to be encoded.void writeList(List<Object> list)
list - the list to be encoded.void writeArray(List<Object> array)
array - the array to be encoded.void writeStruct(int type,
Struct struct)
type - the type of the struct.struct - the struct to be encoded.void writeFloat(float aFloat)
aFloat - the float to be encoded.void writeDouble(double aDouble)
aDouble - the double to be encoded.void writeInt8(byte aByte)
aByte - the integer to be encoded.void writeInt16(short aShort)
aShort - the integer to be encoded.void writeInt32(int anInt)
anInt - the integer to be encoded.void writeInt64(long aLong)
aLong - the integer to be encoded.void writeBin128(byte[] bytes)
bytes - the bytes array to be encoded.int position()
void init()
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.