|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSerialio.SerByteQueue
Implements a High-performance Byte FIFO using a ringbuffer.
| Constructor Summary | |
SerByteQueue(int queueSize)
|
|
| Method Summary | |
int |
available()
Get number of bytes in the queue |
void |
clear()
Clear the byte queue. |
byte |
get()
Get byte from queue Note: will block if queue is empty |
void |
get(byte[] buf,
int off,
int cnt)
Get bytes from queue and store into buffer Note: will block if insufficient bytes in queue. |
int |
getID()
Get the Queue ID |
boolean |
isEmpty()
Get empty state of queue |
boolean |
isFull()
Get full state of queue |
void |
put(byte value)
Put byte into queue Note: will block if queue is full |
void |
setID(int id)
Set the Queue ID |
int |
size()
Get size of queue. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SerByteQueue(int queueSize)
| Method Detail |
public void get(byte[] buf,
int off,
int cnt)
throws java.lang.InterruptedException
buf - The buffer to store the dataoff - The buffer offset to store the datacnt - The number of bytes to store in the
java.lang.InterruptedException
public byte get()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void put(byte value)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic boolean isEmpty()
public boolean isFull()
public int available()
public int size()
public void clear()
public void setID(int id)
public int getID()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||