Class Buffer

java.lang.Object
com.mku.streams.Buffer

public class Buffer extends Object
Buffer that can be used for buffered streams.
  • Constructor Details

    • Buffer

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

    • getData

      public byte[] getData()
      Get the buffer data
      Returns:
      The buffer data
    • 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.