public abstract class BinaryOutputReader extends BaseDataReader
BaseDataReader.AdaptiveSleepingPolicy, BaseDataReader.SleepingPolicy
isStopped, mySleepingPolicy, mySleepMonitor
Constructor and Description |
---|
BinaryOutputReader(java.io.InputStream stream,
BaseDataReader.SleepingPolicy sleepingPolicy) |
Modifier and Type | Method and Description |
---|---|
protected void |
close() |
protected abstract void |
onBinaryAvailable(byte [] data,
int size) |
protected boolean |
readAvailableBlocking()
Reader in a blocking mode blocks on IO read operation until data is received.
|
protected boolean |
readAvailableNonBlocking()
Non-blocking read returns the control back to the process handler when there is no data to read.
|
beforeSleeping, doRun, executeOnPooledThread, flush, readAvailable, start, start, stop, waitFor, waitFor
public BinaryOutputReader(java.io.InputStream stream, BaseDataReader.SleepingPolicy sleepingPolicy)
protected boolean readAvailableNonBlocking() throws java.io.IOException
BaseDataReader
readAvailableNonBlocking
in class BaseDataReader
java.io.IOException
BaseDataReader.SleepingPolicy.NON_BLOCKING
protected final boolean readAvailableBlocking() throws java.io.IOException
BaseDataReader
readAvailableBlocking
in class BaseDataReader
java.io.IOException
BaseDataReader.SleepingPolicy.BLOCKING
protected abstract void onBinaryAvailable(byte [] data, int size)
protected void close() throws java.io.IOException
close
in class BaseDataReader
java.io.IOException