public class TSerializer
extends java.lang.Object
| Constructor and Description |
|---|
TSerializer()
Create a new TSerializer that uses the TBinaryProtocol by default.
|
TSerializer(TProtocolFactory protocolFactory)
Create a new TSerializer.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
serialize(TBase base)
Serialize the Thrift object into a byte array.
|
java.lang.String |
toString(TBase base)
Serialize the Thrift object into a Java string, using the default JVM
charset encoding.
|
public TSerializer()
throws TTransportException
TTransportException - if there an error initializing the underlying transport.public TSerializer(TProtocolFactory protocolFactory) throws TTransportException
protocolFactory - Factory to create a protocolTTransportException - if there an error initializing the underlying transport.public byte[] serialize(TBase base) throws TException
base - The object to serializeTException - if an error is encountered during serialization.public java.lang.String toString(TBase base) throws TException
base - The object to serializeTException - if an error is encountered during serialization.