public static MappedBuffer allocate(File file) {
    return allocate(file, FileChannel.MapMode.READ_WRITE, DEFAULT_INITIAL_CAPACITY, Integer.MAX_VALUE);
  }
public static MappedBuffer allocate ( File file ) { return allocate ( file , FileChannel . MapMode . READ_WRITE , DEFAULT_INITIAL_CAPACITY , Integer . MAX_VALUE ) ; }
Allocates a dynamic capacity mapped buffer in {@link FileChannel.MapMode#READ_WRITE} mode with an initial capacity
of {@code 16MiB} and a maximum capacity of {@link Integer#MAX_VALUE}.
<p>
The resulting buffer will have a maximum capacity of {@link Integer#MAX_VALUE}. As bytes are written to the buffer
its capacity will double in count each time the current capacity is reached. Memory will be mapped by opening and
expanding the given {@link File} to the desired {@code capacity} and mapping the file contents into memory via
{@link FileChannel#map(FileChannel.MapMode, long, long)}.

@param file The file to map into memory.
@return The mapped buffer.
@throws NullPointerException If {@code file} is {@code null}
@see #allocate(File, FileChannel.MapMode)
@see #allocate(File, int)
@see #allocate(File, FileChannel.MapMode, int)
@see #allocate(File, int, int)
@see #allocate(File, FileChannel.MapMode, int, int)