|
XNIO API 3.0.7.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
org.xnio.streams.BufferPipeOutputStream
public class BufferPipeOutputStream
An OutputStream implementation which writes out ByteBuffers to a consumer.
| Nested Class Summary | |
|---|---|
static interface |
BufferPipeOutputStream.BufferWriter
A buffer writer for an BufferPipeOutputStream. |
| Constructor Summary | |
|---|---|
BufferPipeOutputStream(BufferPipeOutputStream.BufferWriter bufferWriterTask)
Construct a new instance. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.io.OutputStream |
|---|
write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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 task
IOException - if an error occurs while initializing the stream| Method Detail |
|---|
public void write(int b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOException
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOExceptionpublic Pooled<ByteBuffer> breakPipe()
BufferPipeOutputStream.BufferWriter.accept(org.xnio.Pooled, boolean) are
unblocked, preferably with a BrokenPipeException.
null if none was pending
|
XNIO API 3.0.7.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||