code: public static MappedBuffer allocate(File file, FileChannel.MapMode mode, int capacity) {
      return allocate(file, mode, capacity, capacity);
    }
docs: Allocates a fixed capacity mapped buffer in the given {@link FileChannel.MapMode}.
  <p>
  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)}.
  <p>
  The resulting buffer will have a capacity of {@code capacity}. The underlying {@link MappedBytes} will be
  initialized to the next power of {@code 2}.
  
  @param file     The file to map into memory.
  @param mode     The mode with which to map the file.
  @param capacity The fixed capacity of the buffer to allocate (in bytes).
  @return The mapped buffer.
  @throws NullPointerException     If {@code file} is {@code null}
  @throws IllegalArgumentException If the {@code capacity} is greater than {@link Integer#MAX_VALUE}.
  @see #allocate(File)
  @see #allocate(File, FileChannel.MapMode)
  @see #allocate(File, int)
  @see #allocate(File, int, int)
  @see #allocate(File, FileChannel.MapMode, int, int)