public abstract class AbstractCodec extends java.lang.Object implements Codec
AbstractCodec
.Modifier and Type | Field and Description |
---|---|
protected Format |
inputFormat |
protected Format[] |
inputFormats |
protected java.lang.String |
name |
protected Format |
outputFormat |
protected Format[] |
outputFormats |
CODEC_FAILED, CODEC_INPUT_NOT_CONSUMED, CODEC_OK, CODEC_OUTPUT_NOT_FILLED
Constructor and Description |
---|
AbstractCodec(Format[] supportedInputOutputFormats) |
AbstractCodec(Format[] supportedInputFormats,
Format[] supportedOutputFormats) |
Modifier and Type | Method and Description |
---|---|
Format |
getInputFormat() |
Format[] |
getInputFormats()
Lists all of the input formats that this codec accepts.
|
java.lang.String |
getName()
Returns a human readable name of the codec.
|
Format |
getOutputFormat() |
Format[] |
getOutputFormats(Format input)
Lists all of the output formats that this codec can generate
with the provided input format.
|
void |
reset()
Empty implementation of the reset method.
|
Format |
setInputFormat(Format f)
Sets the input format.
|
Format |
setOutputFormat(Format f)
Sets the output format.
|
java.lang.String |
toString() |
protected Format[] inputFormats
protected Format[] outputFormats
protected Format inputFormat
protected Format outputFormat
protected java.lang.String name
public AbstractCodec(Format[] supportedInputOutputFormats)
public Format[] getInputFormats()
Codec
getInputFormats
in interface Codec
public Format[] getOutputFormats(Format input)
Codec
getOutputFormats
in interface Codec
public Format setInputFormat(Format f)
Codec
setInputFormat
in interface Codec
public Format setOutputFormat(Format f)
Codec
setOutputFormat
in interface Codec
public Format getInputFormat()
getInputFormat
in interface Codec
public Format getOutputFormat()
getOutputFormat
in interface Codec
public java.lang.String getName()
Codec
public void reset()
public java.lang.String toString()
toString
in class java.lang.Object