private int readRawAll(byte[] buf, int off, int len) throws TException {
    int bytes = trans_.readAll(buf, off, len);
    if (!ascending) {
      for (int i = off; i < off + bytes; i++) {
        buf[i] = (byte) ~buf[i];
      }
    }
    return bytes;
  }
This method always return the same instance of TSet to avoid creating new
instances. It is the responsibility of the caller to read the value before
calling this method again.
serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java