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, wait
encode
public 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)
StatefulEncoder
setCallback
in interface StatefulEncoder
cb
- the callback to set on the underlying provider specific encoderpublic void setEncoderMonitor(EncoderMonitor monitor)
StatefulEncoder
setEncoderMonitor
in interface StatefulEncoder
monitor
- the monitor to set on the underlying implementationprotected void encodeOccurred(Object encoded)
encoded
- the encoded byproduct.protected EncoderMonitor getEncoderMonitor()
Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.