Package com.mku.streams
Class Buffer
- java.lang.Object
-
- com.mku.streams.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 countbyte[]
getData()
long
getStartPos()
Get the start positionvoid
setCount(long count)
Set the data countvoid
setData(byte[] data)
Set the datavoid
setStartPos(long startPos)
Set the start position
-
-
-
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.
-
-