|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Pump<D>
A Pump connects an InputStream like object to an OutputStream like object. Not every "stream" like object can reliably indicate whether they will block, but this should provide enough options to be useful. The generic type indicates what type of data is flowing through the pump. Possible future versions of this interface may support timed and timeout conditions.
| Method Summary | |
|---|---|
boolean |
isClosed()
Determine whether the end of the stream has been encountered. |
void |
pumpAll()
Completely transfer the input to the output until an "End of Stream" indication occurs. |
int |
pumpCount(int n)
Transfer up to n items from input to output. |
int |
pumpCountUntilBlocked(int n)
Transfer up to n items from input to output, stopping for end-of-stream OR potentially blockage. |
void |
pumpUntilBlocked()
Transfer the input to the output until a blocking condition is detected, and then return control. |
| Method Detail |
|---|
void pumpAll()
void pumpUntilBlocked()
int pumpCount(int n)
n - The maximum number of items to transfer.
int pumpCountUntilBlocked(int n)
n - The maximum number of items to transfer.
boolean isClosed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||