public class BufferPipeOutputStream extends OutputStream
OutputStream
implementation which writes out ByteBuffer
s 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 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 OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.