public static final class ObjectNetworkMessageFilter.FilterTX extends java.lang.Object implements NetworkMessageFilter.FilterTx
Modifier and Type | Field and Description |
---|---|
private ResettableByteArrayOutputStream |
baos
The output stream to get the bytes from
|
private java.io.ObjectOutputStream |
oos
The ObjectOutputStream connected to the byte stream to allow the serialization of objects
|
Constructor and Description |
---|
FilterTX()
Creates a new encoding object filter
|
Modifier and Type | Method and Description |
---|---|
byte[] |
filterTX(java.lang.Object obj)
Encodes an object into bytes by using Object serialization
|
private final ResettableByteArrayOutputStream baos
private final java.io.ObjectOutputStream oos
public byte[] filterTX(java.lang.Object obj) throws java.io.IOException
filterTX
in interface NetworkMessageFilter.FilterTx
obj
- The Object to serializejava.io.IOException
- Thrown if something goes wrong during the serialization