- java.lang.Object
-
- org.xnio.streams.Pipe
-
public final class Pipe extends java.lang.Object
An in-VM pipe between an input stream and an output stream, which does not suffer from the bugs inPipedInputStream
.- Author:
- David M. Lloyd
-
-
Constructor Summary
Constructors Constructor Description Pipe(int bufferSize)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
await()
Wait for the read side to close.java.io.InputStream
getIn()
Get the input (read) side of the pipe.java.io.OutputStream
getOut()
Get the output (write) side of the pipe.
-
-
-
Method Detail
-
await
public void await()
Wait for the read side to close. Used when the writer needs to know when the reader finishes consuming a message.
-
getIn
public java.io.InputStream getIn()
Get the input (read) side of the pipe.- Returns:
- the input side
-
getOut
public java.io.OutputStream getOut()
Get the output (write) side of the pipe.- Returns:
- the output side
-
-