Class BNSNetworkMessageFilter.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 BNSMessage to
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] filterTX​(java.lang.Object obj)
      Converts a BNSMessage 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 BNSMessage to
    • Constructor Detail

      • FilterTX

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

      • filterTX

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