public class TZlibTransport extends TIOStreamTransport
Modifier and Type | Class and Description |
---|---|
static class |
TZlibTransport.Factory |
inputStream_, outputStream_
Constructor and Description |
---|
TZlibTransport(TTransport transport)
Constructs a new TZlibTransport instance.
|
TZlibTransport(TTransport transport,
int compressionLevel)
Constructs a new TZlibTransport instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes both the input and output streams.
|
boolean |
isOpen()
The streams must already be open at construction time, so this should
always return true.
|
void |
open()
The streams must already be open.
|
flush, read, write
consumeBuffer, getBuffer, getBufferPosition, getBytesRemainingInBuffer, peek, readAll, write
public TZlibTransport(TTransport transport)
transport
- the underlying transport to read from and write topublic TZlibTransport(TTransport transport, int compressionLevel)
transport
- the underlying transport to read from and write tocompressionLevel
- 0 for no compression, 9 for maximum compressionpublic boolean isOpen()
TIOStreamTransport
isOpen
in class TIOStreamTransport
public void open() throws TTransportException
TIOStreamTransport
open
in class TIOStreamTransport
TTransportException
- if the transport could not be openedpublic void close()
TIOStreamTransport
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class TIOStreamTransport