|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.thrift.transport.TTransport
org.apache.thrift.transport.TMemoryBuffer
public class TMemoryBuffer
Memory buffer-based implementation of the TTransport interface.
| Constructor Summary | |
|---|---|
TMemoryBuffer(int size)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the transport. |
java.lang.String |
inspect()
|
boolean |
isOpen()
Queries whether the transport is open. |
int |
length()
|
void |
open()
Opens the transport for reading/writing. |
int |
read(byte[] buf,
int off,
int len)
Reads up to len bytes into buffer buf, starting att offset off. |
java.lang.String |
toString(java.lang.String enc)
Output the contents of the memory buffer as a String, using the supplied encoding |
void |
write(byte[] buf,
int off,
int len)
Writes up to len bytes from the buffer. |
| Methods inherited from class org.apache.thrift.transport.TTransport |
|---|
flush, peek, readAll, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TMemoryBuffer(int size)
| Method Detail |
|---|
public boolean isOpen()
TTransport
isOpen in class TTransportpublic void open()
TTransport
open in class TTransportpublic void close()
TTransport
close in class TTransport
public int read(byte[] buf,
int off,
int len)
TTransport
read in class TTransportbuf - Array to read intooff - Index to start reading atlen - Maximum number of bytes to read
public void write(byte[] buf,
int off,
int len)
TTransport
write in class TTransportbuf - The output data bufferoff - The offset to start writing fromlen - The number of bytes to write
public java.lang.String toString(java.lang.String enc)
throws java.io.UnsupportedEncodingException
enc - the encoding to use
java.io.UnsupportedEncodingExceptionpublic java.lang.String inspect()
public int length()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||