Class BoundedOutputStreamWriter

  • All Implemented Interfaces:
    Closeable, Flushable, Appendable, AutoCloseable

    public class BoundedOutputStreamWriter
    extends Writer
    OutputStreamWriter delegating directly to a sun.nio.cs.StreamEncoder with a controlled underlying buffer size. It enables to wrap an OutputStream as a Writer but with a faster feedback than a default OutputStreamWriter which uses a 8k buffer by default (encapsulated).

    Note: the "flush error" can be of 2 characters (lcb in StreamEncoder) but we can't do much better when encoding.