public abstract class AbstractCodec extends AbstractPlugIn implements Codec
Modifier and Type | Field and Description |
---|---|
protected Format |
inputFormat |
protected Format[] |
inputFormats |
protected boolean |
opened |
protected Format |
outputFormat |
BUFFER_PROCESSED_FAILED, BUFFER_PROCESSED_OK, INPUT_BUFFER_NOT_CONSUMED, OUTPUT_BUFFER_NOT_FILLED, PLUGIN_TERMINATED
Constructor and Description |
---|
AbstractCodec() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkInputBuffer(Buffer b) |
protected void |
dump(java.lang.String label,
Buffer buffer) |
protected Format |
getInputFormat() |
protected Format |
getOutputFormat() |
Format[] |
getSupportedInputFormats() |
abstract Format[] |
getSupportedOutputFormats(Format input) |
protected boolean |
isEOM(Buffer b) |
abstract int |
process(Buffer input,
Buffer output) |
protected void |
propagateEOM(Buffer b) |
Format |
setInputFormat(Format format) |
Format |
setOutputFormat(Format format) |
close, getName, open, reset
addControl, getControl, getControls, removeControl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getControl, getControls
protected Format inputFormat
protected Format outputFormat
protected boolean opened
protected Format[] inputFormats
public Format[] getSupportedInputFormats()
getSupportedInputFormats
in interface Codec
public abstract Format[] getSupportedOutputFormats(Format input)
getSupportedOutputFormats
in interface Codec
public Format setInputFormat(Format format)
setInputFormat
in interface Codec
public Format setOutputFormat(Format format)
setOutputFormat
in interface Codec
protected Format getInputFormat()
protected Format getOutputFormat()
protected boolean checkInputBuffer(Buffer b)
protected boolean isEOM(Buffer b)
protected void propagateEOM(Buffer b)
protected final void dump(java.lang.String label, Buffer buffer)