public abstract class AbstractStatefulEncoder extends Object implements StatefulEncoder
| Constructor and Description |
|---|
AbstractStatefulEncoder()
Creates a stateful encoder where the callback and monitor must be set.
|
AbstractStatefulEncoder(EncoderCallback cb)
Creates a stateful encoder with a callback.
|
AbstractStatefulEncoder(EncoderCallback cb,
EncoderMonitor monitor)
Creates a stateful encoder.
|
AbstractStatefulEncoder(EncoderMonitor monitor)
Creates a stateful encoder with a monitor but no callback.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
encodeOccurred(Object encoded)
Notifies via the callback if one has been set that this encoder has
encoded a unit of encoded data.
|
protected EncoderMonitor |
getEncoderMonitor()
Gets the encoder's monitor.
|
void |
setCallback(EncoderCallback cb)
Sets the callback of the underlying implementation.
|
void |
setEncoderMonitor(EncoderMonitor monitor)
Sets the monitor of the underlying implementation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencodepublic AbstractStatefulEncoder()
public AbstractStatefulEncoder(EncoderCallback cb)
cb - the callback to use for this encoderpublic AbstractStatefulEncoder(EncoderMonitor monitor)
monitor - the monitor to use for this encoderpublic AbstractStatefulEncoder(EncoderCallback cb, EncoderMonitor monitor)
cb - the callback to use for this encodermonitor - the monitor to use for this encoderpublic void setCallback(EncoderCallback cb)
StatefulEncodersetCallback in interface StatefulEncodercb - the callback to set on the underlying provider specific encoderpublic void setEncoderMonitor(EncoderMonitor monitor)
StatefulEncodersetEncoderMonitor in interface StatefulEncodermonitor - the monitor to set on the underlying implementationprotected void encodeOccurred(Object encoded)
encoded - the encoded byproduct.protected EncoderMonitor getEncoderMonitor()
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.