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
Method Summary |
static java.util.BitSet |
fromByteArray(byte[] bytes)
Returns a bitset containing the values in bytes. |
java.lang.Class<? extends IScheme> |
getScheme()
Scheme accessor |
java.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TTupleProtocol
public TTupleProtocol(TTransport transport)
getScheme
public java.lang.Class<? extends IScheme> getScheme()
- Description copied from class:
TProtocol
- Scheme accessor
- Overrides:
getScheme
in class TProtocol
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