public final class PipeBufferedStream extends Object
OutputStream
to a InputStream
.
This class is not thread-safe : the buffer has to be fully filled before reading from it : if the consumers reads
faster than the producer writes into it, then the consumer will get to the end of the buffer and that will be
interpreted an end-of-stream.Constructor and Description |
---|
PipeBufferedStream()
Constructs a new
PipeBufferedStream with a default Factory . |
PipeBufferedStream(Factory<Buffer> bufferFactory)
Constructs a new
PipeBufferedStream with the given Factory . |
Modifier and Type | Method and Description |
---|---|
OutputStream |
getIn()
Returns the output stream which writes to the pipe.
|
InputStream |
getOut()
Returns the input stream which reads from the pipe.
|
public PipeBufferedStream()
PipeBufferedStream
with a default Factory
.public PipeBufferedStream(Factory<Buffer> bufferFactory)
PipeBufferedStream
with the given Factory
.bufferFactory
- The factory to use to create the buffer holding the bytes.public OutputStream getIn()
public InputStream getOut()
Copyright © 2010-2018, ForgeRock All Rights Reserved.