code: public ByteBuffer mmap(int length, MMAPProt prot, MMAPFlags flags, int offset) throws IOException {
          long pointer = mmap(getFileDescriptor(), length, prot.flag, flags.flag, offset);
  
          if(pointer == -1)
              throw new LinuxFileException();
  
          return newMappedByteBuffer(length, pointer, () -> {
              munmapDirect(pointer, length);
          });
      }
docs: Direct memory mapping from a file descriptor.
  This is normally possible through the local FileChannel,
  but NIO will try to truncate files if they don't report
  a correct size. This will avoid that.
  
  
  @param length length of desired mapping
  @param prot protocol used for mapping
  @param flags flags for mapping
  @param offset offset in file for mapping
  @return direct mapped ByteBuffer
  @throws IOException