Class Buffer


  • public class Buffer
    extends java.lang.Object
    Buffer that can be used for buffered streams.
    • Constructor Summary

      Constructors 
      Constructor Description
      Buffer​(int bufferSize)
      Instantiate a buffer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clear the buffer.
      long getCount()
      Get the data count
      byte[] getData()  
      long getStartPos()
      Get the start position
      void setCount​(long count)
      Set the data count
      void setData​(byte[] data)
      Set the data
      void setStartPos​(long startPos)
      Set the start position
      • Methods inherited from class java.lang.Object

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

      • Buffer

        public Buffer​(int bufferSize)
        Instantiate a buffer.
        Parameters:
        bufferSize - The buffer size
    • Method Detail

      • getData

        public byte[] getData()
      • setData

        public void setData​(byte[] data)
        Set the data
        Parameters:
        data - The data
      • getStartPos

        public long getStartPos()
        Get the start position
        Returns:
        The start position
      • setStartPos

        public void setStartPos​(long startPos)
        Set the start position
        Parameters:
        startPos - The start position
      • getCount

        public long getCount()
        Get the data count
        Returns:
        The data count
      • setCount

        public void setCount​(long count)
        Set the data count
        Parameters:
        count - The data count
      • clear

        public void clear()
        Clear the buffer.