Class BNSNetworkMessageFilter.FilterRX

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

static final class BNSNetworkMessageFilter.FilterRX extends Object implements NetworkMessageFilter.FilterRx
The filter used to convert an array of bytes back into a BNSMessage
  • Field Details

    • byteIn

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

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

    • FilterRX

      FilterRX()
      Creates a new decoding BNSMessageFilter
  • Method Details

    • filterRX

      public Object filterRX(byte[] bytes) throws IOException
      Decodes a byte array back into a BNSMessage
      Specified by:
      filterRX in interface NetworkMessageFilter.FilterRx
      Parameters:
      bytes - The bytes to convert back into a BNSMessage
      Returns:
      The recreated BNSMessage
      Throws:
      IOException - Thrown if something goes wrong during the recreation