code: public static UnsafeMappedBuffer allocate(File file, FileChannel.MapMode mode, long capacity) {
      return allocate(file, mode, capacity, capacity);
    }
docs: Allocates a fixed capacity mapped buffer in the given {@link java.nio.channels.FileChannel.MapMode}.
  <p>
  Memory will be mapped by opening and expanding the given {@link java.io.File} to the desired {@code capacity} 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 capacity}. The underlying {@link UnsafeMappedBytes} 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 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, long, long)
  @see UnsafeMappedBuffer#allocate(java.io.File, java.nio.channels.FileChannel.MapMode, long, long)