Class BaseHeader

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected byte[] header  
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseHeader()
      Default Constructor.
      BaseHeader​(byte[] header)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      Allow object to be cloned.
      void dump​(java.io.PrintStream p, java.lang.String indent)  
      java.lang.String getDestination()
      Return the destination address in this ISOHeader.
      int getLength()
      return the number of bytes in this ISOHeader
      java.lang.String getSource()
      Return the source address in this ISOHeader.
      boolean isAsciiEncoding()  
      byte[] pack()
      Return this header as byte array.
      void setAsciiEncoding​(boolean asciiEncoding)  
      void setDestination​(java.lang.String dst)
      Set the Destination address in this ISOHeader.
      void setSource​(java.lang.String src)
      Set the Source address in this ISOHeader.
      void swapDirection()
      Swap the source and destination addresses in this ISOHeader (if they exist).
      int unpack​(byte[] header)
      Create a new ISOHeader from a byte array.
      • Methods inherited from class java.lang.Object

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

      • header

        protected byte[] header
    • Constructor Detail

      • BaseHeader

        public BaseHeader()
        Default Constructor. Used by Class.forName.newInstance(...);
      • BaseHeader

        public BaseHeader​(byte[] header)
    • Method Detail

      • clone

        public java.lang.Object clone()
        Description copied from interface: ISOHeader
        Allow object to be cloned.
        Specified by:
        clone in interface ISOHeader
        Overrides:
        clone in class java.lang.Object
      • pack

        public byte[] pack()
        Description copied from interface: ISOHeader
        Return this header as byte array.
        Specified by:
        pack in interface ISOHeader
      • unpack

        public int unpack​(byte[] header)
        Description copied from interface: ISOHeader
        Create a new ISOHeader from a byte array.
        Specified by:
        unpack in interface ISOHeader
        Returns:
        The Number of bytes consumed.
      • setSource

        public void setSource​(java.lang.String src)
        Description copied from interface: ISOHeader
        Set the Source address in this ISOHeader.
        Specified by:
        setSource in interface ISOHeader
      • getDestination

        public java.lang.String getDestination()
        Description copied from interface: ISOHeader
        Return the destination address in this ISOHeader. returns null if there is no destination address
        Specified by:
        getDestination in interface ISOHeader
      • getSource

        public java.lang.String getSource()
        Description copied from interface: ISOHeader
        Return the source address in this ISOHeader. returns null if there is no source address
        Specified by:
        getSource in interface ISOHeader
      • swapDirection

        public void swapDirection()
        Description copied from interface: ISOHeader
        Swap the source and destination addresses in this ISOHeader (if they exist).
        Specified by:
        swapDirection in interface ISOHeader
      • dump

        public void dump​(java.io.PrintStream p,
                         java.lang.String indent)
        Specified by:
        dump in interface Loggeable