|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A BasicStream is a non-blocking Streaming interface. The only blocking method in it is close(). You would hardly use this interface directly, it is generally only used by native methods that require a non-blocking interface, since native methods cannot pause a running Thread without blocking the entire VM.
| Method Summary | |
boolean |
close()
Closes the stream. |
boolean |
closeStream()
This is non-blocking. |
boolean |
flushStream()
This is non-blocking. |
boolean |
isOpen()
Returns if the stream is open or not. |
int |
nonBlockingRead(byte[] buff,
int start,
int count)
This is the non-blocking read operation. |
int |
nonBlockingWrite(byte[] buff,
int start,
int count)
This is the non-blocking write operation. |
| Method Detail |
public int nonBlockingRead(byte[] buff,
int start,
int count)
buff - Destination byte array to hold incoming data.start - Starting index in buff for incoming data.count - Maximum number of bytes to read - should never be zero.
public int nonBlockingWrite(byte[] buff,
int start,
int count)
buff - Source byte array holding data to be written.start - Starting index in buff for data to be written.count - Number of bytes to write - should never be zero.
public boolean close()
public boolean isOpen()
public boolean flushStream()
throws IOException
IOException
public boolean closeStream()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||