Class PipelineOutputStream

java.lang.Object
java.io.OutputStream
org.greenrobot.essentials.io.PipelineOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class PipelineOutputStream extends OutputStream
Replacement for Java's PipedOutputStream: all data written to this stream will get available in the integrated InputStream (see getInputStream()).

Note: Usually, you will have exactly two threads: one to write and one to read. If you use a single thread, avoid reading more bytes than previously written or writing more bytes than the internal buffer can handle.