Class TerminatedOutputStream

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

    public class TerminatedOutputStream
    extends OutputStream
    A wrapping output stream that writes a terminating byte when closing the stream. It is meant to be paired with a TerminatedInputStream, which will terminate the wrapping stream as it at end of content when the terminating byte is read.Note that the input behavior will be faulty if the terminating byte is written to the output stream.