code: public static long copy(final InputStream is, final RandomAccessFile raf,
              final long offset, long length) throws IOException {
          return copy(is, raf, offset, length, null, null);
      }
docs: Copy method for copying data from an {@link InputStream} to a
  {@link RandomAccessFile}.
  
  @param is The input data.
  @param raf The file to write to.
  @param offset The offset within the file to start writing at.
  @param length The number of bytes to copy.
  @return The number of bytes copied.
  @throws IOException If any IO error occurs.