public class RingBuffer<T>
extends java.lang.Object
| Constructor and Description |
|---|
RingBuffer(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Get the next object, block until available.
|
boolean |
isEmpty() |
void |
put(java.lang.Iterable<T> collection)
Put all the bytes to the buffer.
|
void |
put(java.lang.Object value)
put object, block until there is space available.
|
T |
read()
Nonblocking get the next object
|
java.util.ArrayList<T> |
readAll()
Get all data available from the buffer
|
public T get()
public T read()
public void put(java.lang.Object value)
value - object to putpublic void put(java.lang.Iterable<T> collection)
collection - public boolean isEmpty()
public java.util.ArrayList<T> readAll()