Class BlockingBinaryEncoder

All Implemented Interfaces:
Flushable

public class BlockingBinaryEncoder extends BufferedBinaryEncoder
A BinaryEncoder implementation that writes large arrays and maps as a sequence of blocks. So long as individual primitive values fit in memory, arbitrarily long arrays and maps may be written and subsequently read without exhausting memory. Values are buffered until the specified block size would be exceeded, minimizing block overhead.

Use EncoderFactory.blockingBinaryEncoder(OutputStream, BinaryEncoder) to construct and configure.

BlockingBinaryEncoder buffers writes, data may not appear on the output until flush() is called.

BlockingBinaryEncoder is not thread-safe

See Also: