Package org.jcsp.net2.cns
Class CNSNetworkMessageFilter.FilterTX
java.lang.Object
org.jcsp.net2.cns.CNSNetworkMessageFilter.FilterTX
- All Implemented Interfaces:
NetworkMessageFilter.FilterTx
- Enclosing class:
CNSNetworkMessageFilter
static final class CNSNetworkMessageFilter.FilterTX
extends Object
implements NetworkMessageFilter.FilterTx
The encoding filter used to convert a CNSMessage into bytes
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteArrayOutputStream
The byte stream we will use to retrieve the byte message fromprivate final DataOutputStream
The data stream, used to write the parts of the CNSMessage to -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
baos
The byte stream we will use to retrieve the byte message from -
dos
The data stream, used to write the parts of the CNSMessage to
-
-
Constructor Details
-
FilterTX
FilterTX()Creates a new CNS encoding filter
-
-
Method Details
-
filterTX
Converts an object (a CNSMessage) into bytes- Specified by:
filterTX
in interfaceNetworkMessageFilter.FilterTx
- Parameters:
obj
- The CNSMessage to convert- Returns:
- The byte equivalent of the CNSMessage
- Throws:
IOException
- Thrown if something goes wrong during the conversion
-