|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.blur.thirdparty.thrift_0_9_0.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. |
String |
toString(TBase base)
Serialize the Thrift object into a Java string, using the default JVM charset encoding. |
String |
toString(TBase base,
String charset)
Serialize the Thrift object into a Java string, using a specified character set for encoding. |
Methods inherited from class java.lang.Object |
---|
equals, 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 String toString(TBase base, String charset) throws TException
base
- The object to serializecharset
- Valid JVM charset
TException
public 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 |