code: public static FileBuffer allocate(File file, String mode, long initialCapacity, long maxCapacity) {
      return new FileBuffer(new FileBytes(file, mode, Memory.Util.toPow2(initialCapacity)), 0, initialCapacity, maxCapacity);
    }
docs: Allocates a file buffer.
  <p>
  The resulting buffer will be initialized with a capacity of {@code initialCapacity}. The underlying {@link FileBytes}
  will be initialized to the nearest power of {@code 2}. As bytes are written to the file the buffer's capacity will
  double up to {@code maxCapacity}.
  
  @param file The file to allocate.
  @param mode The mode in which to open the underlying {@link java.io.RandomAccessFile}.
  @param initialCapacity The initial capacity of the buffer.
  @param maxCapacity The maximum allowed capacity of the buffer.
  @return The allocated buffer.
  
  @see FileBuffer#allocate(java.io.File)
  @see FileBuffer#allocate(java.io.File, long)
  @see FileBuffer#allocate(java.io.File, long, long)