public abstract class IntEncoderFilter extends IntEncoder
IntEncoderwhich is served as a filter on the values to encode. An encoder filter wraps another
IntEncoderwhich does the actual encoding. This allows for chaining filters and encoders, such as:
new UniqueValuesIntEncoder(new DGapIntEncoder(new VInt8IntEnoder()));
|Modifier and Type||Field and Description|
|Modifier||Constructor and Description|
|Modifier and Type||Method and Description|
Instructs the encoder to finish the encoding process.
Reinitializes the encoder with the give
protected final IntEncoder encoder
protected IntEncoderFilter(IntEncoder encoder)
public void close() throws IOException
reInit. An implementation may do here additional cleanup required to complete the encoding, such as flushing internal buffers, etc.
encodeshould be made before first calling
NOTE: overriding classes should make sure they either call
super.close() or close the output stream themselves.
public void reInit(OutputStream out)
OutputStream. For re-usability it can be changed without the need to reconstruct a new object.
NOTE: after calling
IntEncoder.close(), one must call
this method even if the output stream itself hasn't changed. An example
case is that the output stream wraps a byte, and the output stream itself
is reset, but its instance hasn't changed. Some implementations of
IntEncoder may write some metadata about themselves to the output
stream, and therefore it is imperative that one calls this method before
encoding any data.
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.