Class ClosedWriter

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

    public class ClosedWriter
    extends Writer
    Throws an exception on all attempts to write with close() implemented as a noop.

    Typically uses of this class include testing for corner cases in methods that accept a writer and acting as a sentinel value instead of a null writer.


Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.