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