public ByteBuffer readBinary() throws TException {
  int length=readVarint32();
  checkStringReadLength(length);
  if (length == 0)   return ByteBuffer.wrap(new byte[0]);
  if (trans_.getBytesRemainingInBuffer() >= length) {
    ByteBuffer bb=ByteBuffer.wrap(trans_.getBuffer(),trans_.getBufferPosition(),length);
    trans_.consumeBuffer(length);
    return bb;
  }
  byte[] buf=new byte[length];
  trans_.readAll(buf,0,length);
  return ByteBuffer.wrap(buf);
}

public ByteBuffer readBinary ( ) throws TException { int length = readVarint32 ( ) ; checkStringReadLength ( length ) ; if ( length == 0 ) return ByteBuffer . wrap ( new byte [ 0 ] ) ; if ( trans_ . getBytesRemainingInBuffer ( ) >= length ) { ByteBuffer bb = ByteBuffer . wrap ( trans_ . getBuffer ( ) , trans_ . getBufferPosition ( ) , length ) ; trans_ . consumeBuffer ( length ) ; return bb ; } byte [ ] buf = new byte [ length ] ; trans_ . readAll ( buf , 0 , length ) ; return ByteBuffer . wrap ( buf ) ; }
read a byte [ ] from the wire .
