public void writeBinary(ByteBuffer bin) throws TException {
  int length=bin.limit() - bin.position();
  writeBinary(bin.array(),bin.position() + bin.arrayOffset(),length);
}

public void writeBinary ( ByteBuffer bin ) throws TException { int length = bin . limit ( ) - bin . position ( ) ; writeBinary ( bin . array ( ) , bin . position ( ) + bin . arrayOffset ( ) , length ) ; }
write a byte array , using a varint for the size .
