public class TFramedTransport
extends org.apache.thrift.transport.TTransport
| Modifier and Type | Class and Description |
|---|---|
static class |
TFramedTransport.Factory |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_MAX_LENGTH |
| Constructor and Description |
|---|
TFramedTransport(org.apache.thrift.transport.TTransport transport) |
TFramedTransport(org.apache.thrift.transport.TTransport transport,
int maxLength)
Constructor wraps around another transport
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
consumeBuffer(int len) |
static int |
decodeFrameSize(byte[] buf) |
static void |
encodeFrameSize(int frameSize,
byte[] buf) |
void |
flush() |
byte[] |
getBuffer() |
int |
getBufferPosition() |
int |
getBytesRemainingInBuffer() |
boolean |
isOpen() |
void |
open() |
int |
read(byte[] buf,
int off,
int len) |
void |
write(byte[] buf,
int off,
int len) |
protected static final int DEFAULT_MAX_LENGTH
public TFramedTransport(org.apache.thrift.transport.TTransport transport,
int maxLength)
public TFramedTransport(org.apache.thrift.transport.TTransport transport)
public void open()
throws org.apache.thrift.transport.TTransportException
open in class org.apache.thrift.transport.TTransportorg.apache.thrift.transport.TTransportExceptionpublic boolean isOpen()
isOpen in class org.apache.thrift.transport.TTransportpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class org.apache.thrift.transport.TTransportpublic int read(byte[] buf,
int off,
int len)
throws org.apache.thrift.transport.TTransportException
read in class org.apache.thrift.transport.TTransportorg.apache.thrift.transport.TTransportExceptionpublic byte[] getBuffer()
getBuffer in class org.apache.thrift.transport.TTransportpublic int getBufferPosition()
getBufferPosition in class org.apache.thrift.transport.TTransportpublic int getBytesRemainingInBuffer()
getBytesRemainingInBuffer in class org.apache.thrift.transport.TTransportpublic void consumeBuffer(int len)
consumeBuffer in class org.apache.thrift.transport.TTransportpublic void write(byte[] buf,
int off,
int len)
throws org.apache.thrift.transport.TTransportException
write in class org.apache.thrift.transport.TTransportorg.apache.thrift.transport.TTransportExceptionpublic void flush()
throws org.apache.thrift.transport.TTransportException
flush in class org.apache.thrift.transport.TTransportorg.apache.thrift.transport.TTransportExceptionpublic static final void encodeFrameSize(int frameSize,
byte[] buf)
public static final int decodeFrameSize(byte[] buf)