Class CNSNetworkMessageFilter.FilterRX

java.lang.Object
org.jcsp.net2.cns.CNSNetworkMessageFilter.FilterRX
All Implemented Interfaces:
NetworkMessageFilter.FilterRx
Enclosing class:
CNSNetworkMessageFilter

static final class CNSNetworkMessageFilter.FilterRX extends Object implements NetworkMessageFilter.FilterRx
The filter used to convert a CNSMessage from its byte representation back into an object
  • Field Details

    • byteIn

      private ByteArrayInputStream byteIn
      The input end to read the message back from
    • dis

      private DataInputStream dis
      The data input stream used to read in the parts of the message
  • Constructor Details

    • FilterRX

      FilterRX()
      Creates a new decoding CNSMessage filter
  • Method Details

    • filterRX

      public Object filterRX(byte[] bytes) throws IOException
      Decodes the byte equivalent of a CNSMessage
      Specified by:
      filterRX in interface NetworkMessageFilter.FilterRx
      Parameters:
      bytes - The byte equivalent of a CNSMessage
      Returns:
      The recreated CNSMessage
      Throws:
      IOException - Thrown if something goes wrong during the recreation