public static Binary fromConstantByteBuffer(final ByteBuffer value, int offset, int length) {
    return new ByteBufferBackedBinary(value, offset, length, false);
  }
@Test
  public void testWriteAllTo() throws Exception {
    byte[] orig = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
    testWriteAllToHelper(Binary.fromConstantByteBuffer(ByteBuffer.wrap(orig)), orig);
    ByteBuffer buf = ByteBuffer.allocateDirect(orig.length);
    buf.put(orig);
    buf.flip();
    testWriteAllToHelper(Binary.fromConstantByteBuffer(buf), orig);
  }