public interface FormatWriter
| Modifier and Type | Method and Description |
|---|---|
byte[] |
toByteArray()
Copy the internal buffers into a new byte array.
|
void |
writeBool(boolean val)
Writes a boolean to the underlying buffer.
|
void |
writeByte(byte val)
Writes a byte to the underlying buffer.
|
void |
writeBytes(byte[] val)
Writes a byte array to the underlying buffer.
|
void |
writeBytesNoCopy(byte[] val)
Write the bytes to the final buffer.
|
void |
writeDouble(double val)
Writes a double to the underlying buffer.
|
<T extends java.lang.Enum<T>> |
writeEnum(T val)
Writes an enum to the underlying buffer.
|
void |
writeFloat(float val)
Writes a float to the underlying buffer.
|
void |
writeInt(int val)
Writes an integer to the underlying buffer.
|
void |
writeLong(long val)
Writes a long to the underlying buffer.
|
<T extends FormatMarshaller> |
writeObject(T val)
Writes an object to the underlying buffer.
|
void |
writeObjectMarshalled(java.lang.Object val)
Writes an object to the underlying buffer using an object marshaller.
|
void |
writeObjectSerialized(java.io.Serializable val)
Writes an object to the underlying buffer by serializing it.
|
void |
writeShort(short val)
Writes a short to the underlying buffer.
|
void |
writeString(java.lang.String val)
Writes a string to the underlying buffer.
|
void writeBool(boolean val)
throws FormatException
val - - The boolean to write.FormatException - If there was a problem while writing.void writeByte(byte val)
throws FormatException
val - - The short to write.FormatException - If there was a problem while writing.void writeShort(short val)
throws FormatException
val - - The short to write.FormatException - If there was a problem while writing.void writeInt(int val)
throws FormatException
val - - The integer to write.FormatException - If there was a problem while writing.void writeLong(long val)
throws FormatException
val - - The double to write.FormatException - If there was a problem while writing.void writeFloat(float val)
throws FormatException
val - - the float to write.FormatException - If there was a problem while writing.void writeDouble(double val)
throws FormatException
val - - The double to write.FormatException - If there was a problem while writing.void writeString(java.lang.String val)
throws FormatException
val - - The string to write.FormatException - If there was a problem while writing.void writeBytes(byte[] val)
throws FormatException
val - - The byte array to write.FormatException - If there was a problem while writing.void writeBytesNoCopy(byte[] val)
throws FormatException
val - - The byte array to write.FormatException - If there was a problem while writing.<T extends java.lang.Enum<T>> void writeEnum(T val)
throws FormatException
val - - The enum to write.FormatException - If there was a problem while writing.<T extends FormatMarshaller> void writeObject(T val) throws FormatException
val - - The object to write.FormatException - If there was a problem while writing.void writeObjectMarshalled(java.lang.Object val)
throws FormatException
val - - The object to write.FormatException - If there was a problem while writing.void writeObjectSerialized(java.io.Serializable val)
throws FormatException
val - - The object to write.FormatException - If there was a problem while writing.byte[] toByteArray()