com.petersalomonsen.jjack.javasound
public class BlockingByteFIFO extends Object
Version: 0.3
Field Summary | |
---|---|
boolean | blocking |
byte[] | buffer |
long | bufferPosRead |
long | bufferPosWrite |
Constructor Summary | |
---|---|
BlockingByteFIFO(int size) |
Method Summary | |
---|---|
int | availableRead() |
int | availableWrite() |
void | block() |
void | flush()
Discard unread data |
long | getBufferPosRead() |
long | getBufferPosWrite() |
int | getBufferSize()
Return the size of the buffer |
int | read(byte[] b, int off, int len)
Read into provided byteArray - will block until all data is read |
int | readLenOrAvailable(byte[] b, int off, int len)
Read all requested amount of data, or the maximum that is available for reading |
void | unblock() |
int | write(byte[] b, int off, int len)
Write data of provided bytearray. |
int | writeLenOrAvailable(byte[] b, int off, int len)
Write all requested amount of data, or the maximum that is available for writing |
Returns: the bufferPosRead
Returns: the bufferPosWrite