- java.lang.Object
-
- ch.bind.philib.io.RingBuffer
-
- All Implemented Interfaces:
DoubleSidedBuffer
public final class RingBuffer extends Object implements DoubleSidedBuffer
- Author:
- Philipp Meinen
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CAPACITY
-
Constructor Summary
Constructors Constructor Description RingBuffer()RingBuffer(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()intcapacity()voidclear()booleanisEmpty()voidread(byte[] data)voidread(byte[] data, int off, int len)voidreadBack(byte[] data)voidreadBack(byte[] data, int off, int len)voidwrite(byte[] data)voidwrite(byte[] data, int off, int len)voidwriteFront(byte[] data)voidwriteFront(byte[] data, int off, int len)
-
-
-
Field Detail
-
DEFAULT_CAPACITY
public static final int DEFAULT_CAPACITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
available
public int available()
- Specified by:
availablein interfaceDoubleSidedBuffer
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceDoubleSidedBuffer
-
capacity
public int capacity()
- Specified by:
capacityin interfaceDoubleSidedBuffer
-
clear
public void clear()
- Specified by:
clearin interfaceDoubleSidedBuffer
-
read
public void read(byte[] data)
- Specified by:
readin interfaceDoubleSidedBuffer
-
read
public void read(byte[] data, int off, int len)- Specified by:
readin interfaceDoubleSidedBuffer
-
readBack
public void readBack(byte[] data)
- Specified by:
readBackin interfaceDoubleSidedBuffer
-
readBack
public void readBack(byte[] data, int off, int len)- Specified by:
readBackin interfaceDoubleSidedBuffer
-
write
public void write(byte[] data)
- Specified by:
writein interfaceDoubleSidedBuffer
-
write
public void write(byte[] data, int off, int len)- Specified by:
writein interfaceDoubleSidedBuffer
-
writeFront
public void writeFront(byte[] data)
- Specified by:
writeFrontin interfaceDoubleSidedBuffer
-
writeFront
public void writeFront(byte[] data, int off, int len)- Specified by:
writeFrontin interfaceDoubleSidedBuffer
-
-