code: public static UnsafeMappedBuffer allocate(File file, long initialCapacity, long maxCapacity) {
      return allocate(file, MappedMemoryAllocator.DEFAULT_MAP_MODE, initialCapacity, maxCapacity);
    }
docs: Allocates a mapped buffer.
  <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)}.
  <p>
  The resulting buffer will have a capacity of {@code initialCapacity}. The underlying {@link UnsafeMappedBytes} will be
  initialized to the next power of {@code 2}. As bytes are written to the buffer, the buffer's capacity will double
  as long as {@code maxCapacity > capacity}.
  
  @param file The file to map into memory. If the file doesn't exist it will be automatically created.
  @param initialCapacity The initial capacity of the buffer.
  @param maxCapacity The maximum capacity of the buffer.
  @return The mapped buffer.
  @throws NullPointerException If {@code file} is {@code null}
  @throws IllegalArgumentException If the {@code capacity} or {@code maxCapacity} is greater than
  {@link Integer#MAX_VALUE}.
  
  @see UnsafeMappedBuffer#allocate(java.io.File)
  @see UnsafeMappedBuffer#allocate(java.io.File, java.nio.channels.FileChannel.MapMode)
  @see UnsafeMappedBuffer#allocate(java.io.File, long)
  @see UnsafeMappedBuffer#allocate(java.io.File, java.nio.channels.FileChannel.MapMode, long)
  @see UnsafeMappedBuffer#allocate(java.io.File, java.nio.channels.FileChannel.MapMode, long, long)