|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.lilik.capturemjpeg.CircularBuffer
class CircularBuffer
A circular buffer of ByteArrayInputStream
Field Summary | |
---|---|
(package private) static int |
DEFAULT_SIZE
default size |
Constructor Summary | |
---|---|
CircularBuffer()
Creates a CircularBuffer with
internel buffer of
DEFAULT_SIZE |
|
CircularBuffer(int size)
Creates a new CircularBuffer with
the specified size. |
Method Summary | |
---|---|
void |
clear()
Clears the contents of the buffer. |
int |
getLength()
Returns the number of elements into the buffer |
int |
getSize()
Returns the size of the buffer. |
boolean |
isEmpty()
Returns the status of the buffer. |
ByteArrayInputStream |
pop()
Gets the first available element. |
void |
push(ByteArrayInputStream data)
Adds a an element to the CircularBuffer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int DEFAULT_SIZE
Constructor Detail |
---|
public CircularBuffer(int size)
CircularBuffer
with
the specified size.
size
- the size of the buffer.public CircularBuffer()
CircularBuffer
with
internel buffer of
DEFAULT_SIZE
Method Detail |
---|
public void push(ByteArrayInputStream data)
CircularBuffer
data
- the new elementpublic int getLength()
public ByteArrayInputStream pop()
IndexOutOfBoundsExceptions
public boolean isEmpty()
true
if empty, otherwise false
public void clear()
public int getSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |