|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asyncobjects.io.BinaryDataBuilder
public final class BinaryDataBuilder
Binary data builder, this is a utility class that could be used to build binary data from datatypes. The builder accumulates appends and than can be used to create binary data basing on them.
Note this class is not a thread-safe.
Constructor Summary | |
---|---|
BinaryDataBuilder()
|
Method Summary | |
---|---|
void |
append(BinaryData data)
Append binary data |
void |
append(byte data)
Append 8-bit byte |
void |
append(double data)
Append 64-bit IEEE float |
void |
append(float data)
Append 32-bit IEEE float |
void |
append(int data)
Append 32-bit integer |
void |
append(long data)
Append 64-bit integer |
void |
append(short data)
Append 16-bit integer |
void |
appendASCII(char data)
Append character in ascii form |
void |
appendASCII(String data)
Append string in ASCII form. |
BinaryData |
toBinaryData()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryDataBuilder()
Method Detail |
---|
public void appendASCII(String data)
data
- a string to appendpublic void appendASCII(char data)
data
- a data to appendpublic void append(BinaryData data)
data
- a data to appendpublic void append(byte data)
data
- a data to appendpublic void append(short data)
data
- a data to appendpublic void append(int data)
data
- a data to appendpublic void append(long data)
data
- a data to appendpublic void append(float data)
data
- a data to appendpublic void append(double data)
data
- a data to appendpublic BinaryData toBinaryData()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |