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 class
TTupleProtocol.Factory
-
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.BitSet
fromByteArray(byte[] bytes)
Returns a bitset containing the values in bytes.java.lang.Class<? extends IScheme>
getScheme()
Scheme accessorjava.util.BitSet
readBitSet(int i)
TList
readListBegin(byte type)
void
readListEnd()
TMap
readMapBegin(byte keyType, byte valTyep)
void
readMapEnd()
TSet
readSetBegin(byte type)
void
readSetEnd()
static byte[]
toByteArray(java.util.BitSet bits, int vectorWidth)
Returns a byte array of at least length 1.void
writeBitSet(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, 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
-
-
-
-
Constructor Detail
-
TTupleProtocol
public TTupleProtocol(TTransport transport)
-
-
Method Detail
-
getScheme
public java.lang.Class<? extends IScheme> getScheme()
Description copied from class:TProtocol
Scheme 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:
readMapEnd
in classTCompactProtocol
- Throws:
TException
-
readListEnd
public void readListEnd() throws TException
- Overrides:
readListEnd
in classTCompactProtocol
- Throws:
TException
-
readSetEnd
public void readSetEnd() throws TException
- Overrides:
readSetEnd
in classTCompactProtocol
- Throws:
TException
-
-