Package org.jcsp.net2

Class ObjectNetworkMessageFilter.FilterRX

    • Field Summary

      Fields 
      Modifier and Type Field 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 Summary

      Constructors 
      Constructor Description
      FilterRX()
      Creates a new incoming object filter
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object filterRX​(byte[] bytes)
      Decodes an incoming byte array, converting it back into an Object
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • objectStreamHeader

        static final byte[] objectStreamHeader
        These four bytes represent the normal header expected in Java for object streams
      • ois

        private final java.io.ObjectInputStream ois
        The ObjectInputStream used to read the objects from.
    • Constructor Detail

      • FilterRX

        public FilterRX()
        Creates a new incoming object filter
    • Method Detail

      • filterRX

        public java.lang.Object filterRX​(byte[] bytes)
                                  throws java.io.IOException
        Decodes an incoming byte array, converting it back into an Object
        Specified by:
        filterRX in interface NetworkMessageFilter.FilterRx
        Parameters:
        bytes - The byte representation of the object
        Returns:
        The recreated Object
        Throws:
        java.io.IOException - Thrown of something goes wrong during the decoding