Class CNSNetworkMessageFilter.FilterTX

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.ByteArrayOutputStream baos
      The byte stream we will use to retrieve the byte message from
      private java.io.DataOutputStream dos
      The data stream, used to write the parts of the CNSMessage to
    • Constructor Summary

      Constructors 
      Constructor Description
      FilterTX()
      Creates a new CNS encoding filter
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] filterTX​(java.lang.Object obj)
      Converts an object (a CNSMessage) into bytes
      • Methods inherited from class java.lang.Object

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

      • baos

        private final java.io.ByteArrayOutputStream baos
        The byte stream we will use to retrieve the byte message from
      • dos

        private final java.io.DataOutputStream dos
        The data stream, used to write the parts of the CNSMessage to
    • Constructor Detail

      • FilterTX

        FilterTX()
        Creates a new CNS encoding filter
    • Method Detail

      • filterTX

        public byte[] filterTX​(java.lang.Object obj)
                        throws java.io.IOException
        Converts an object (a CNSMessage) into bytes
        Specified by:
        filterTX in interface NetworkMessageFilter.FilterTx
        Parameters:
        obj - The CNSMessage to convert
        Returns:
        The byte equivalent of the CNSMessage
        Throws:
        java.io.IOException - Thrown if something goes wrong during the conversion