|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ByteBufferReader
This is a common interface to read into my Buffer classes. It is a Reader that allows many threads to read data at the same time (thread-safe).
NOTE: this software is released under GPL License. See the LICENSE of this distribution for more informations.
| Method Summary | |
|---|---|
long |
getSize()
Returns the size (in bytes) of the data stored into the buffer. |
byte[] |
getWholeBufferAsByteArray()
Returns the whole buffer into a byte array. |
int |
readByte()
Read a single byte of data from the buffer |
int |
readBytes(byte[] data,
int size)
Reads the requested amount of data from the buffer and stores them into the provided byte array. |
void |
reset()
Reset the Reader and rewinds it to the begin. |
| Method Detail |
|---|
int readBytes(byte[] data,
int size)
throws java.io.IOException
data - the byte array where data will be writtensize - the max number of data that can be written.
java.io.IOException - if something goes wrong
int readByte()
throws java.io.IOException
java.io.IOException - if something goes wrong
void reset()
throws java.io.IOException
java.io.IOException
byte[] getWholeBufferAsByteArray()
throws java.io.IOException
java.io.IOExceptionlong getSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||