org.apache.kafka.common.record
Class ByteBufferOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.apache.kafka.common.record.ByteBufferOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ByteBufferOutputStream
extends java.io.OutputStream

A byte buffer backed output outputStream


Constructor Summary
ByteBufferOutputStream(java.nio.ByteBuffer buffer)
           
 
Method Summary
 java.nio.ByteBuffer buffer()
           
 void write(byte[] bytes, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
close, flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferOutputStream

public ByteBufferOutputStream(java.nio.ByteBuffer buffer)
Method Detail

write

public void write(int b)
Specified by:
write in class java.io.OutputStream

write

public void write(byte[] bytes,
                  int off,
                  int len)
Overrides:
write in class java.io.OutputStream

buffer

public java.nio.ByteBuffer buffer()