Class Stream5250


  • public class Stream5250
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Stream5250()  
      Stream5250​(byte[] abyte0)  
    • Method Summary

      Modifier and Type Method Description
      byte getByteOffset​(int off)  
      int getCurrentPos()
      Returns where we are in the buffer
      byte getNextByte()  
      int getOpCode()  
      byte[] getSegment()
      This routine will retrieve a segment based on the first two bytes being the length of the segment.
      void getSegment​(byte[] segment, int length, boolean adjustPos)
      This routine will retrieve a byte array based on the first two bytes being the length of the segment.
      boolean hasNext()
      Determines if any more bytes are available in the buffer to be processed.
      void initialize​(byte[] abyte0)
      This method takes a byte array and initializes the object information to be used.
      void setPrevByte()  
      boolean size()  
      • Methods inherited from class java.lang.Object

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

      • streamSize

        public int streamSize
      • opCode

        public int opCode
      • dataStart

        public int dataStart
      • pos

        public int pos
      • buffer

        public byte[] buffer
    • Constructor Detail

      • Stream5250

        public Stream5250​(byte[] abyte0)
      • Stream5250

        public Stream5250()
    • Method Detail

      • initialize

        public void initialize​(byte[] abyte0)
        This method takes a byte array and initializes the object information to be used.
        Parameters:
        abyte0 - bytes
      • getOpCode

        public final int getOpCode()
      • getNextByte

        public final byte getNextByte()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setPrevByte

        public final void setPrevByte()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getCurrentPos

        public final int getCurrentPos()
        Returns where we are in the buffer
        Returns:
        position in the buffer
      • getByteOffset

        public final byte getByteOffset​(int off)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • size

        public final boolean size()
      • hasNext

        public final boolean hasNext()
        Determines if any more bytes are available in the buffer to be processed.
        Returns:
        yes or no
      • getSegment

        public final byte[] getSegment()
                                throws java.lang.Exception
        This routine will retrieve a segment based on the first two bytes being the length of the segment.
        Returns:
        a new byte array containing the bytes of the segment.
        Throws:
        java.lang.Exception - exception
      • getSegment

        public final void getSegment​(byte[] segment,
                                     int length,
                                     boolean adjustPos)
                              throws java.lang.Exception
        This routine will retrieve a byte array based on the first two bytes being the length of the segment.
        Parameters:
        segment - - byte array
        length - - length of segment to return
        adjustPos - - adjust the position of the buffer to the end of the seg ment
        Throws:
        java.lang.Exception - exception