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)
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
readBinary, readBool, readByte, readDouble, readFieldBegin, readFieldEnd, readI16, readI32, readI64, readListBegin, readListEnd, readMapBegin, readMapEnd, readMessageBegin, readMessageEnd, readSetBegin, readSetEnd, 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
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
-
-