|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.thrift.TDeserializer
public class TDeserializer
Generic utility for easily deserializing objects from a byte array or Java String.
Constructor Summary | |
---|---|
TDeserializer()
Create a new TDeserializer that uses the TBinaryProtocol by default. |
|
TDeserializer(TProtocolFactory protocolFactory)
Create a new TDeserializer. |
Method Summary | |
---|---|
void |
deserialize(TBase base,
byte[] bytes)
Deserialize the Thrift object from a byte array. |
void |
deserialize(TBase base,
java.lang.String data,
java.lang.String charset)
Deserialize the Thrift object from a Java string, using a specified character set for decoding. |
void |
fromString(TBase base,
java.lang.String data)
Deserialize the Thrift object from a Java string, using the default JVM charset encoding. |
void |
partialDeserialize(TBase tb,
byte[] bytes,
TFieldIdEnum fieldIdPathFirst,
TFieldIdEnum... fieldIdPathRest)
Deserialize only a single Thrift object (addressed by recursively using field id) from a byte record. |
java.lang.Boolean |
partialDeserializeBool(byte[] bytes,
TFieldIdEnum fieldIdPathFirst,
TFieldIdEnum... fieldIdPathRest)
Deserialize only a boolean field (addressed by recursively using field id) from a byte record. |
java.lang.Byte |
partialDeserializeByte(byte[] bytes,
TFieldIdEnum fieldIdPathFirst,
TFieldIdEnum... fieldIdPathRest)
Deserialize only a byte field (addressed by recursively using field id) from a byte record. |
java.nio.ByteBuffer |
partialDeserializeByteArray(byte[] bytes,
TFieldIdEnum fieldIdPathFirst,
TFieldIdEnum... fieldIdPathRest)
Deserialize only a binary field (addressed by recursively using field id) from a byte record. |
java.lang.Double |
partialDeserializeDouble(byte[] bytes,
TFieldIdEnum fieldIdPathFirst,
TFieldIdEnum... fieldIdPathRest)
Deserialize only a double field (addressed by recursively using field id) from a byte record. |
java.lang.Short |
partialDeserializeI16(byte[] bytes,
TFieldIdEnum fieldIdPathFirst,
TFieldIdEnum... fieldIdPathRest)
Deserialize only an i16 field (addressed by recursively using field id) from a byte record. |
java.lang.Integer |
partialDeserializeI32(byte[] bytes,
TFieldIdEnum fieldIdPathFirst,
TFieldIdEnum... fieldIdPathRest)
Deserialize only an i32 field (addressed by recursively using field id) from a byte record. |
java.lang.Long |
partialDeserializeI64(byte[] bytes,
TFieldIdEnum fieldIdPathFirst,
TFieldIdEnum... fieldIdPathRest)
Deserialize only an i64 field (addressed by recursively using field id) from a byte record. |
java.lang.Short |
partialDeserializeSetFieldIdInUnion(byte[] bytes,
TFieldIdEnum fieldIdPathFirst,
TFieldIdEnum... fieldIdPathRest)
Deserialize only the id of the field set in a TUnion (addressed by recursively using field id) from a byte record. |
java.lang.String |
partialDeserializeString(byte[] bytes,
TFieldIdEnum fieldIdPathFirst,
TFieldIdEnum... fieldIdPathRest)
Deserialize only a string field (addressed by recursively using field id) from a byte record. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TDeserializer()
public TDeserializer(TProtocolFactory protocolFactory)
protocolFactory
- Factory to create a protocolMethod Detail |
---|
public void deserialize(TBase base, byte[] bytes) throws TException
base
- The object to read intobytes
- The array to read from
TException
public void deserialize(TBase base, java.lang.String data, java.lang.String charset) throws TException
base
- The object to read intodata
- The string to read fromcharset
- Valid JVM charset
TException
public void partialDeserialize(TBase tb, byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum... fieldIdPathRest) throws TException
tb
- The object to read intobytes
- The serialized object to read fromfieldIdPathFirst
- First of the FieldId's that define a path tbfieldIdPathRest
- The rest FieldId's that define a path tb
TException
public java.lang.Boolean partialDeserializeBool(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum... fieldIdPathRest) throws TException
bytes
- The serialized object to read fromfieldIdPathFirst
- First of the FieldId's that define a path to a boolean fieldfieldIdPathRest
- The rest FieldId's that define a path to a boolean field
TException
public java.lang.Byte partialDeserializeByte(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum... fieldIdPathRest) throws TException
bytes
- The serialized object to read fromfieldIdPathFirst
- First of the FieldId's that define a path to a byte fieldfieldIdPathRest
- The rest FieldId's that define a path to a byte field
TException
public java.lang.Double partialDeserializeDouble(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum... fieldIdPathRest) throws TException
bytes
- The serialized object to read fromfieldIdPathFirst
- First of the FieldId's that define a path to a double fieldfieldIdPathRest
- The rest FieldId's that define a path to a double field
TException
public java.lang.Short partialDeserializeI16(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum... fieldIdPathRest) throws TException
bytes
- The serialized object to read fromfieldIdPathFirst
- First of the FieldId's that define a path to an i16 fieldfieldIdPathRest
- The rest FieldId's that define a path to an i16 field
TException
public java.lang.Integer partialDeserializeI32(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum... fieldIdPathRest) throws TException
bytes
- The serialized object to read fromfieldIdPathFirst
- First of the FieldId's that define a path to an i32 fieldfieldIdPathRest
- The rest FieldId's that define a path to an i32 field
TException
public java.lang.Long partialDeserializeI64(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum... fieldIdPathRest) throws TException
bytes
- The serialized object to read fromfieldIdPathFirst
- First of the FieldId's that define a path to an i64 fieldfieldIdPathRest
- The rest FieldId's that define a path to an i64 field
TException
public java.lang.String partialDeserializeString(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum... fieldIdPathRest) throws TException
bytes
- The serialized object to read fromfieldIdPathFirst
- First of the FieldId's that define a path to a string fieldfieldIdPathRest
- The rest FieldId's that define a path to a string field
TException
public java.nio.ByteBuffer partialDeserializeByteArray(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum... fieldIdPathRest) throws TException
bytes
- The serialized object to read fromfieldIdPathFirst
- First of the FieldId's that define a path to a binary fieldfieldIdPathRest
- The rest FieldId's that define a path to a binary field
TException
public java.lang.Short partialDeserializeSetFieldIdInUnion(byte[] bytes, TFieldIdEnum fieldIdPathFirst, TFieldIdEnum... fieldIdPathRest) throws TException
bytes
- The serialized object to read fromfieldIdPathFirst
- First of the FieldId's that define a path to a TUnionfieldIdPathRest
- The rest FieldId's that define a path to a TUnion
TException
public void fromString(TBase base, java.lang.String data) throws TException
base
- The object to read intodata
- The string to read from
TException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |