Class PrintStreamOutputStream

All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class PrintStreamOutputStream extends OutputStream
Wraps a PrintStream to be an OutputStream. Although PrintStream subclasses OutputStream, it handles errors differently. This calls checkError after every write to properly detect and throw exceptions as expected for an OutputStream. Because checkError is documented as flushing the stream this may have an adverse affect on performance.
AO Industries, Inc.