public class QueueOutputStream extends OutputStream
PipedOutputStream; queue input stream provides what's written in queue output stream.
QueueOutputStream outputStream = new QueueOutputStream(); QueueInputStream inputStream = outputStream.newPipeInputStream(); outputStream.write("hello world".getBytes(UTF_8)); inputStream.read();Unlike JDK
PipedOutputStream, queue input/output streams may be used safely in a single thread or multiple threads. Also, unlike JDK classes, no special meaning is attached to initial or current thread. Instances can be used longer after initial threads exited.
QueueOutputStream has no effect. The methods in this class can be called after the stream has been
closed without generating an
|Constructor and Description|
Constructs a new instance with no limit to internal buffer size.
Constructs a new instance with given buffer.
|Modifier and Type||Method and Description|
Creates a new QueueInputStream instance connected to this.
Writes a single byte.
public QueueInputStream newQueueInputStream()
Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.