Package com.rabbitmq.client.impl.nio
Class ByteBufferOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.rabbitmq.client.impl.nio.ByteBufferOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class ByteBufferOutputStream extends OutputStream
Bridge between the byte buffer and stream worlds.
-
-
Constructor Summary
Constructors Constructor Description ByteBufferOutputStream(WritableByteChannel channel, ByteBuffer buffer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
drain(WritableByteChannel channel, ByteBuffer buffer)
void
flush()
void
write(int b)
-
Methods inherited from class java.io.OutputStream
close, nullOutputStream, write, write
-
-
-
-
Constructor Detail
-
ByteBufferOutputStream
public ByteBufferOutputStream(WritableByteChannel channel, ByteBuffer buffer)
-
-
Method Detail
-
write
public void write(int b) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
drain
public static void drain(WritableByteChannel channel, ByteBuffer buffer) throws IOException
- Throws:
IOException
-
-