public final class AutoExpandingBufferWriteTransport extends TTransport
| Constructor | Description |
|---|---|
AutoExpandingBufferWriteTransport(int initialCapacity,
double growthCoefficient) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Closes the transport.
|
AutoExpandingBuffer |
getBuf() |
|
int |
getPos() |
|
boolean |
isOpen() |
Queries whether the transport is open.
|
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 at offset off.
|
void |
reset() |
|
void |
write(byte[] toWrite,
int off,
int len) |
Writes up to len bytes from the buffer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsumeBuffer, flush, getBuffer, getBufferPosition, getBytesRemainingInBuffer, peek, readAll, writepublic AutoExpandingBufferWriteTransport(int initialCapacity,
double growthCoefficient)
public void close()
TTransportclose in class TTransportpublic boolean isOpen()
TTransportisOpen in class TTransportpublic void open()
throws TTransportException
TTransportopen in class TTransportTTransportException - if the transport could not be openedpublic int read(byte[] buf,
int off,
int len)
throws TTransportException
TTransportread in class TTransportbuf - Array to read intooff - Index to start reading atlen - Maximum number of bytes to readTTransportException - if there was an error reading datapublic void write(byte[] toWrite,
int off,
int len)
throws TTransportException
TTransportwrite in class TTransporttoWrite - The output data bufferoff - The offset to start writing fromlen - The number of bytes to writeTTransportException - if there was an error writing datapublic AutoExpandingBuffer getBuf()
public int getPos()
public void reset()