Package org.apache.thrift.transport
Class TZlibTransport
java.lang.Object
org.apache.thrift.transport.TTransport
org.apache.thrift.transport.TEndpointTransport
org.apache.thrift.transport.TIOStreamTransport
org.apache.thrift.transport.TZlibTransport
- All Implemented Interfaces:
Closeable
,AutoCloseable
TZlibTransport deflates on write and inflates on read.
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.thrift.transport.TIOStreamTransport
inputStream_, outputStream_
Fields inherited from class org.apache.thrift.transport.TEndpointTransport
knownMessageSize, remainingMessageSize
-
Constructor Summary
ConstructorDescriptionTZlibTransport
(TTransport transport) Constructs a new TZlibTransport instance.TZlibTransport
(TTransport transport, int compressionLevel) Constructs a new TZlibTransport instance. -
Method Summary
Methods inherited from class org.apache.thrift.transport.TIOStreamTransport
flush, read, write
Methods inherited from class org.apache.thrift.transport.TEndpointTransport
checkReadBytesAvailable, countConsumedMessageBytes, getConfiguration, getMaxFrameSize, getMaxMessageSize, resetConsumedMessageSize, setMaxFrameSize, updateKnownMessageSize
Methods inherited from class org.apache.thrift.transport.TTransport
consumeBuffer, getBuffer, getBufferPosition, getBytesRemainingInBuffer, peek, read, readAll, write, write
-
Constructor Details
-
TZlibTransport
Constructs a new TZlibTransport instance.- Parameters:
transport
- the underlying transport to read from and write to- Throws:
TTransportException
-
TZlibTransport
Constructs a new TZlibTransport instance.- Parameters:
transport
- the underlying transport to read from and write tocompressionLevel
- 0 for no compression, 9 for maximum compression- Throws:
TTransportException
-
-
Method Details
-
isOpen
public boolean isOpen()Description copied from class:TTransport
Queries whether the transport is open.- Overrides:
isOpen
in classTIOStreamTransport
- Returns:
- false after close is called.
-
open
Description copied from class:TIOStreamTransport
The streams must already be open. This method does nothing.- Overrides:
open
in classTIOStreamTransport
- Throws:
TTransportException
- if the transport could not be opened
-
close
public void close()Description copied from class:TIOStreamTransport
Closes both the input and output streams.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classTIOStreamTransport
-