private static int put(byte[] block, int offset, ByteBuffer buf) {
    int len = Math.min(block.length - offset, buf.remaining());
    buf.get(block, offset, len);
    return len;
  }
private static int put ( byte [ ] block , int offset , ByteBuffer buf ) { int len = Math . min ( block . length - offset , buf . remaining ( ) ) ; buf . get ( block , offset , len ) ; return len ; }
Puts the contents of the given byte buffer at the given offset in the given block.