Module id.xfunction

Class LinesOutputStream

Object
OutputStream
LinesOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class LinesOutputStream extends OutputStream
Concurrent write of data as sequence of bytes and read it back as Stream of lines.

Allows one thread to write data into this OutputStream and another to receive such data back as Stream of lines.

OutputStream.write(int) call blocks until another thread reads the next line.