private static void put(byte[] block, int offset, ByteBuffer buf) {
    int len = Math.min(block.length - offset, buf.remaining());
    buf.get(block, offset, len);
  }
Puts the contents of the given byte buffer at the given offset in the given block.
jimfs/src/main/java/com/google/common/jimfs/RegularFile.java