public abstract class BufferMonitor extends AbstractState<BufferMonitorState,IOException> implements Comparable<BufferMonitor>
User can set event listeners or wait for a state change. E.g. // Block until stream has buffered 1000 bytes inputStream. createAlarm(inputStream.getPosition() + 1000, null). waitForState(AlarmState.FINAL_STATES);
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
cancel.
|
int |
compareTo(BufferMonitor o) |
long |
getTriggerPos()
Getter for the field
triggerPos. |
protected void |
setError(IOException e)
setError.
|
addStateListener, addStateNotifiable, attemptSetState, clearError, getError, getState, hasError, isStateTransitionAllowed, onListenerException, onStateTransition, removeStateListener, removeStateNotifiable, setState, setState, throwIfError, waitForState, waitForState, waitForStateUninterruptiblypublic void cancel()
cancel.
public int compareTo(BufferMonitor o)
compareTo in interface Comparable<BufferMonitor>public long getTriggerPos()
Getter for the field triggerPos.
protected void setError(IOException e)
setError.
setError in class AbstractState<BufferMonitorState,IOException>e - a IOException object.Copyright © 2026. All rights reserved.