Class BlockingDirectBinaryEncoder

All Implemented Interfaces:
Flushable

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

This encoder does not buffer writes in contrast to BufferedBinaryEncoder. However, it is lighter-weight and useful when: The buffering in BufferedBinaryEncoder is not desired because you buffer a different level or the Encoder is very short-lived.

The BlockingDirectBinaryEncoder will encode the number of bytes of the Map and Array blocks. This will allow to postpone the decoding, or skip over it at all.

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

BlockingDirectBinaryEncoder instances returned by this method are not thread-safe

See Also: