public static final class ObjectNetworkMessageFilter.FilterRX extends java.lang.Object implements NetworkMessageFilter.FilterRx
Modifier and Type | Field and Description |
---|---|
private ResettableByteArrayInputStream |
bais
The byte array stream used to connect to the ObjectInputStream
|
(package private) static byte[] |
objectStreamHeader
These four bytes represent the normal header expected in Java for object streams
|
private java.io.ObjectInputStream |
ois
The ObjectInputStream used to read the objects from.
|
Constructor and Description |
---|
FilterRX()
Creates a new incoming object filter
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
filterRX(byte[] bytes)
Decodes an incoming byte array, converting it back into an Object
|
static final byte[] objectStreamHeader
private final ResettableByteArrayInputStream bais
private final java.io.ObjectInputStream ois
public java.lang.Object filterRX(byte[] bytes) throws java.io.IOException
filterRX
in interface NetworkMessageFilter.FilterRx
bytes
- The byte representation of the objectjava.io.IOException
- Thrown of something goes wrong during the decoding