| Constructor and Description |
|---|
BBEncoder(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
int |
beginSize16() |
int |
beginSize32() |
int |
beginSize8() |
ByteBuffer |
buffer() |
protected void |
doPut(byte b) |
protected void |
doPut(ByteBuffer src) |
void |
endSize16(int pos) |
void |
endSize32(int pos) |
void |
endSize8(int pos) |
void |
init() |
int |
position() |
protected void |
put(byte b) |
protected void |
put(byte[] bytes) |
protected void |
put(ByteBuffer src) |
ByteBuffer |
segment() |
ByteBuffer |
underlyingBuffer() |
void |
writeArray(List<Object> array)
An array is an ordered sequence of values of the same type.
|
protected void |
writeArrayEntries(List<Object> array) |
void |
writeBin128(byte[] byteArray)
The bin128 type consists of 16 consecutive octets of opaque binary data.
|
void |
writeBin128(UUID id) |
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.
|
protected void |
writeListEntries(List<Object> list) |
void |
writeMagicNumber()
Encodes the AMQP magic number.
|
void |
writeMap(Map<String,Object> map)
A map is a set of distinct keys where each key has an associated (type,value) pair.
|
protected void |
writeMapEntries(Map<String,Object> map) |
void |
writeSequenceNo(int i)
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 s)
The struct32 type describes any coded struct with a 32-bit (4 octet) size.
|
void |
writeStruct32(Struct s)
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.
|
public void init()
public ByteBuffer segment()
public ByteBuffer buffer()
public int position()
public ByteBuffer underlyingBuffer()
protected void doPut(byte b)
protected void doPut(ByteBuffer src)
protected void put(byte[] bytes)
public void writeUint8(short b)
EncoderwriteUint8 in interface Encoderb - the unsigned integer to be encoded.public void writeUint16(int s)
EncoderwriteUint16 in interface Encoders - the unsigned integer to be encoded.public void writeUint32(long i)
EncoderwriteUint32 in interface Encoderi - the unsigned integer to be encoded.public void writeUint64(long l)
EncoderwriteUint64 in interface Encoderl - the unsigned integer to be encoded.public int beginSize8()
public void endSize8(int pos)
public int beginSize16()
public void endSize16(int pos)
public int beginSize32()
public void endSize32(int pos)
public void writeDouble(double aDouble)
EncoderaDouble - the double to be encoded.public void writeInt16(short aShort)
EncoderaShort - the integer to be encoded.public void writeInt32(int anInt)
EncoderanInt - the integer to be encoded.public void writeInt64(long aLong)
EncoderaLong - the integer to be encoded.public void writeInt8(byte aByte)
EncoderaByte - the integer to be encoded.public void writeBin128(byte[] byteArray)
EncoderbyteArray - the bytes array to be encoded.public void writeBin128(UUID id)
public void writeFloat(float aFloat)
EncoderaFloat - the float to be encoded.public void writeMagicNumber()
Encoderprotected void put(byte b)
protected void put(ByteBuffer src)
public void writeSequenceNo(int i)
EncoderwriteSequenceNo in interface Encoderi - the sequence number to be encoded.public void writeDatetime(long l)
EncoderwriteDatetime in interface Encoderl - the datetime (as long) to be encoded.public void writeStr8(String s)
Encoderpublic void writeStr16(String s)
EncoderwriteStr16 in interface Encoders - the string to be encoded.public void writeVbin8(byte[] bytes)
EncoderwriteVbin8 in interface Encoderbytes - the byte array to be encoded.public void writeVbin16(byte[] bytes)
EncoderwriteVbin16 in interface Encoderbytes - the byte array to be encoded.public void writeVbin32(byte[] bytes)
EncoderwriteVbin32 in interface Encoderbytes - the byte array to be encoded.public void writeSequenceSet(RangeSet ranges)
writeSequenceSet in interface Encoderpublic void writeByteRanges(RangeSet ranges)
writeByteRanges in interface Encoderpublic void writeUuid(UUID uuid)
Encoderpublic void writeStruct(int type,
Struct s)
EncoderwriteStruct in interface Encodertype - the type of the struct.s - the struct to be encoded.public void writeStruct32(Struct s)
EncoderwriteStruct32 in interface Encoders - the struct to be encoded.public void writeMap(Map<String,Object> map)
Encoderpublic void writeList(List<Object> list)
Encoderpublic void writeArray(List<Object> array)
EncoderwriteArray in interface Encoderarray - the array to be encoded.Copyright © 2006–2015 The Apache Software Foundation. All rights reserved.