public class BufferPipeOutputStream extends OutputStream
OutputStream implementation which writes out ByteBuffers to a consumer.| Modifier and Type | Class and Description |
|---|---|
static interface |
BufferPipeOutputStream.BufferWriter
A buffer writer for an
BufferPipeOutputStream. |
| Constructor and Description |
|---|
BufferPipeOutputStream(BufferPipeOutputStream.BufferWriter bufferWriterTask)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Pooled<ByteBuffer> |
breakPipe()
Break the pipe and return any filling pooled buffer.
|
void |
close() |
void |
flush() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
writepublic BufferPipeOutputStream(BufferPipeOutputStream.BufferWriter bufferWriterTask) throws IOException
bufferSize. The
given bufferWriterTask will be called to send buffers, flush the output stream, and handle the
end-of-file condition.bufferWriterTask - the writer taskIOException - if an error occurs while initializing the streampublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic Pooled<ByteBuffer> breakPipe()
BufferPipeOutputStream.BufferWriter.accept(org.xnio.Pooled, boolean) are
unblocked, preferably with a BrokenPipeException.null if none was pendingCopyright © 2017 JBoss by Red Hat. All rights reserved.