Method Summary |
|
long | getDataSize(DataElement data) Returns the size of DataElement with service information
to get the total size required to work with this DataElement. |
long | getPureDataSize(DataElement data) Returns the size of DataElement without service information. |
boolean | readBoolean() Reads boolean value from the connection. |
byte | readByte() Reads 1-byte value from the connection. |
byte[] | readBytes(int size) Reads given number of bytes from the connection.
Parameters: size - number of bytes to read. |
DataElement | readDataElement() Creates a data element from the binary data in the read buffer. |
int | readInteger() Reads 4-byte value from the connection. |
long | readLong() Reads 8-byte value from the connection. |
short | readShort() Reads 2-byte value from the connection. |
UUID | readUUID(int len) Reads UUID of a given size. |
public synchronized DataElement | restore(byte[] data) Constructs DataElement from byte array containing the element in
serialized form. |
public synchronized byte[] | serialize(DataElement data) Serializes given DataElement object, i.e. |
void | writeBoolean(boolean data) Writes boolean data to the buffer.
Writes only value given itself. |
void | writeByte(long data) Writes 1-byte data to the buffer. |
void | writeBytes(byte[] data) Writes given data to the connection. |
void | writeDataElement(DataElement data) Writes given data element into the write buffer. |
void | writeInteger(int data) Writes 4-byte data to the connection. |
void | writeLong(long data) Writes 8-byte data to the connection. |
void | writeShort(short data) Writes 2-byte data to the buffer. |