code: public static MappedBytes allocate(File file, long size) {
      return allocate(file, FileChannel.MapMode.READ_WRITE, size);
    }
docs: Allocates a mapped buffer in {@link java.nio.channels.FileChannel.MapMode#READ_WRITE} mode.
  <p>
  Memory will be mapped by opening and expanding the given {@link java.io.File} to the desired {@code count} and mapping the
  file contents into memory via {@link java.nio.channels.FileChannel#map(java.nio.channels.FileChannel.MapMode, long, long)}.
  
  @param file The file to map into memory. If the file doesn't exist it will be automatically created.
  @param size The count of the buffer to allocate (in bytes).
  @return The mapped buffer.
  @throws NullPointerException If {@code file} is {@code null}
  @throws IllegalArgumentException If {@code count} is greater than {@link MappedMemory#MAX_SIZE}
  
  @see #allocate(java.io.File, java.nio.channels.FileChannel.MapMode, long)