Class DirectBinaryEncoder

All Implemented Interfaces:
Flushable
Direct Known Subclasses:
BlockingDirectBinaryEncoder

public class DirectBinaryEncoder extends BinaryEncoder
An Encoder for Avro's binary encoding that does not buffer output.

This encoder does not buffer writes, and as a result is slower than BufferedBinaryEncoder. However, it is lighter-weight and useful when the buffering in BufferedBinaryEncoder is not desired and/or the Encoder is very short-lived.

To construct, use EncoderFactory.directBinaryEncoder(OutputStream, BinaryEncoder)

DirectBinaryEncoder is not thread-safe

See Also: