|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.thrift.TSerializer
public class TSerializer
Generic utility for easily serializing objects into a byte array or Java String.
Constructor Summary | |
---|---|
TSerializer()
Create a new TSerializer that uses the TBinaryProtocol by default. |
|
TSerializer(TProtocolFactory protocolFactory)
Create a new TSerializer. |
Method Summary | |
---|---|
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. |
java.lang.String |
toString(TBase base,
java.lang.String charset)
Serialize the Thrift object into a Java string, using a specified character set for encoding. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TSerializer()
public TSerializer(TProtocolFactory protocolFactory)
protocolFactory
- Factory to create a protocolMethod Detail |
---|
public byte[] serialize(TBase base) throws TException
base
- The object to serialize
TException
public java.lang.String toString(TBase base, java.lang.String charset) throws TException
base
- The object to serializecharset
- Valid JVM charset
TException
public java.lang.String toString(TBase base) throws TException
base
- The object to serialize
TException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |