voldemort.serialization.thrift
Class MemoryBuffer

java.lang.Object
  extended by org.apache.thrift.transport.TTransport
      extended by voldemort.serialization.thrift.MemoryBuffer

public class MemoryBuffer
extends org.apache.thrift.transport.TTransport


Field Summary
protected  java.io.ByteArrayOutputStream buffer
           
 
Constructor Summary
MemoryBuffer()
           
 
Method Summary
 void close()
           
 boolean isOpen()
           
 void open()
           
 int read(byte[] buf, int off, int len)
           
 byte[] toByteArray()
           
 void write(byte[] buf, int off, int len)
           
 
Methods inherited from class org.apache.thrift.transport.TTransport
consumeBuffer, flush, getBuffer, getBufferPosition, getBytesRemainingInBuffer, peek, readAll, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected java.io.ByteArrayOutputStream buffer
Constructor Detail

MemoryBuffer

public MemoryBuffer()
Method Detail

close

public void close()
Specified by:
close in class org.apache.thrift.transport.TTransport

isOpen

public boolean isOpen()
Specified by:
isOpen in class org.apache.thrift.transport.TTransport

open

public void open()
          throws org.apache.thrift.transport.TTransportException
Specified by:
open in class org.apache.thrift.transport.TTransport
Throws:
org.apache.thrift.transport.TTransportException

read

public int read(byte[] buf,
                int off,
                int len)
         throws org.apache.thrift.transport.TTransportException
Specified by:
read in class org.apache.thrift.transport.TTransport
Throws:
org.apache.thrift.transport.TTransportException

write

public void write(byte[] buf,
                  int off,
                  int len)
           throws org.apache.thrift.transport.TTransportException
Specified by:
write in class org.apache.thrift.transport.TTransport
Throws:
org.apache.thrift.transport.TTransportException

toByteArray

public byte[] toByteArray()


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu