
public class BufferPipeOutputStream
extends java.io.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.
|
public BufferPipeOutputStream(BufferPipeOutputStream.BufferWriter bufferWriterTask) throws java.io.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 taskjava.io.IOException - if an error occurs while initializing the streampublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionpublic Pooled<java.nio.ByteBuffer> breakPipe()
BufferPipeOutputStream.BufferWriter.accept(org.xnio.Pooled, boolean) are
unblocked, preferably with a BrokenPipeException.null if none was pendingCopyright © 2010 JBoss, a division of Red Hat, Inc.