Package org.apache.thrift.protocol
Class TTupleProtocol
- java.lang.Object
-
- org.apache.thrift.protocol.TProtocol
-
- org.apache.thrift.protocol.TCompactProtocol
-
- org.apache.thrift.protocol.TTupleProtocol
-
public final class TTupleProtocol extends TCompactProtocol
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTTupleProtocol.Factory
-
Field Summary
-
Fields inherited from class org.apache.thrift.protocol.TProtocol
skippedBytes, trans_
-
-
Constructor Summary
Constructors Constructor Description TTupleProtocol(TTransport transport)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.BitSetfromByteArray(byte[] bytes)Returns a bitset containing the values in bytes.java.lang.Class<? extends IScheme>getScheme()Scheme accessorjava.util.BitSetreadBitSet(int i)TListreadListBegin(byte type)voidreadListEnd()TMapreadMapBegin(byte keyType, byte valTyep)voidreadMapEnd()TSetreadSetBegin(byte type)voidreadSetEnd()static byte[]toByteArray(java.util.BitSet bits, int vectorWidth)Returns a byte array of at least length 1.voidwriteBitSet(java.util.BitSet bs, int vectorWidth)-
Methods inherited from class org.apache.thrift.protocol.TCompactProtocol
getMinSerializedSize, readBinary, readBool, readByte, readDouble, readFieldBegin, readFieldEnd, readI16, readI32, readI64, readListBegin, readMapBegin, readMessageBegin, readMessageEnd, readSetBegin, readString, readStructBegin, readStructEnd, reset, skipBinary, writeBinary, writeBool, writeByte, writeCollectionBegin, writeDouble, writeFieldBegin, writeFieldEnd, writeFieldStop, writeI16, writeI32, writeI64, writeListBegin, writeListEnd, writeMapBegin, writeMapEnd, writeMessageBegin, writeMessageEnd, writeSetBegin, writeSetEnd, writeString, writeStructBegin, writeStructEnd
-
Methods inherited from class org.apache.thrift.protocol.TProtocol
checkReadBytesAvailable, checkReadBytesAvailable, checkReadBytesAvailable, getTransport, readFieldBeginData, skip, skip, skipBool, skipByte, skipBytes, skipDouble, skipI16, skipI32, skipI64
-
-
-
-
Constructor Detail
-
TTupleProtocol
public TTupleProtocol(TTransport transport)
-
-
Method Detail
-
getScheme
public java.lang.Class<? extends IScheme> getScheme()
Description copied from class:TProtocolScheme accessor
-
writeBitSet
public void writeBitSet(java.util.BitSet bs, int vectorWidth) throws TException- Throws:
TException
-
readBitSet
public java.util.BitSet readBitSet(int i) throws TException- Throws:
TException
-
fromByteArray
public static java.util.BitSet fromByteArray(byte[] bytes)
Returns a bitset containing the values in bytes. The byte-ordering must be big-endian.
-
toByteArray
public static byte[] toByteArray(java.util.BitSet bits, int vectorWidth)Returns a byte array of at least length 1. The most significant bit in the result is guaranteed not to be a 1 (since BitSet does not support sign extension). The byte-ordering of the result is big-endian which means the most significant bit is in element 0. The bit at index 0 of the bit set is assumed to be the least significant bit.- Parameters:
bits-vectorWidth-- Returns:
- a byte array of at least length 1
-
readMapBegin
public TMap readMapBegin(byte keyType, byte valTyep) throws TException
- Throws:
TException
-
readListBegin
public TList readListBegin(byte type) throws TException
- Throws:
TException
-
readSetBegin
public TSet readSetBegin(byte type) throws TException
- Throws:
TException
-
readMapEnd
public void readMapEnd() throws TException- Overrides:
readMapEndin classTCompactProtocol- Throws:
TException
-
readListEnd
public void readListEnd() throws TException- Overrides:
readListEndin classTCompactProtocol- Throws:
TException
-
readSetEnd
public void readSetEnd() throws TException- Overrides:
readSetEndin classTCompactProtocol- Throws:
TException
-
-