| Modifier and Type | Field and Description |
|---|---|
private BinaryWriter |
outputStream |
private BinaryReader |
reader |
| Constructor and Description |
|---|
AMsgBase() |
AMsgBase(int payloadReserve)
Initializes a new instance of the
AMsgBase class. |
| Modifier and Type | Method and Description |
|---|---|
void |
write(byte[] data)
Writes the specified byte array to the message payload.
|
void |
write(int data)
Writes a single 32bit integer to the message payload.
|
void |
write(long data)
Writes a single 64bit long to the message payload.
|
void |
write(String data,
Charset encoding)
Writes the specified string to the message payload using the specified encoding.
|
void |
writeNullTermString(String data,
Charset encoding)
Writes the specified string and a null terminator to the message payload using the specified encoding.
|
private BinaryReader reader
private final BinaryWriter outputStream
public AMsgBase(int payloadReserve)
AMsgBase class.payloadReserve - The number of bytes to initialize the payload capacity to.public AMsgBase()
public void write(int data)
throws IOException
data - The integer.IOExceptionpublic void write(long data)
throws IOException
data - The long.IOExceptionpublic void write(byte[] data)
throws IOException
data - The byte array.IOExceptionpublic void write(String data, Charset encoding) throws IOException
data - The string to write.encoding - The encoding to use.IOExceptionpublic void writeNullTermString(String data, Charset encoding) throws IOException
data - The string to write.encoding - The encoding to use.IOExceptionCopyright © 2012. All Rights Reserved.