Mmap (Apache Tomcat 9.0.111 API Documentation)
Description: declaration: package: org.apache.tomcat.jni, class: Mmap

# Class Mmap

java.lang.Object
org.apache.tomcat.jni.Mmap

@Deprecated public class Mmap extends Object
Deprecated.
The scope of the APR/Native Library will be reduced in Tomcat 9.1.x / Tomcat Native 2.x and has been reduced in Tomcat 10.1.x / Tomcat Native 2.x onwards to only include those components required to provide OpenSSL integration with the NIO and NIO2 connectors.
Mmap.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `APR_MMAP_READ`
  Deprecated.
  MMap opened for reading
  `static final int`
  `APR_MMAP_WRITE`
  Deprecated.
  MMap opened for writing

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Mmap()`
  Deprecated.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static long`
  `create(long file, long offset, long size, int flag, long pool)`
  Deprecated.
  Create a new mmap'ed file out of an existing APR file.
  `static int`
  `delete(long mm)`
  Deprecated.
  Remove a mmap'ed.
  `static long`
  `dup(long mmap, long pool)`
  Deprecated.
  Duplicate the specified MMAP.
  `static long`
  `offset(long mm, long offset)`
  Deprecated.
  Move the pointer into the mmap'ed file to the specified offset.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### APR_MMAP_READ

    public static final int APR_MMAP_READ
    Deprecated.
    MMap opened for reading
    See Also:
      - Constant Field Values

  - ### APR_MMAP_WRITE

    public static final int APR_MMAP_WRITE
    Deprecated.
    MMap opened for writing
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Mmap

    public Mmap()
    Deprecated.

- ## Method Details

  - ### create

    public static long create(long file, long offset, long size, int flag, long pool) throws Error
    Deprecated.
    Create a new mmap'ed file out of an existing APR file.
    Parameters:
      `file` - The file turn into an mmap.
      `offset` - The offset into the file to start the data pointer at.
      `size` - The size of the file
      `flag` - bit-wise or of:

          APR_MMAP_READ       MMap opened for reading
          APR_MMAP_WRITE      MMap opened for writing

      `pool` - The pool to use when creating the mmap.
    Returns:
      The newly created mmap'ed file.
    Throws:
      `Error` - Error creating memory mapping

  - ### dup

    public static long dup(long mmap, long pool) throws Error
    Deprecated.
    Duplicate the specified MMAP.
    Parameters:
      `mmap` - The mmap to duplicate.
      `pool` - The pool to use for new_mmap.
    Returns:
      Duplicated mmap'ed file.
    Throws:
      `Error` - Error duplicating memory mapping

  - ### delete

    public static int delete(long mm)
    Deprecated.
    Remove a mmap'ed.
    Parameters:
      `mm` - The mmap'ed file.
    Returns:
      the operation status

  - ### offset

    public static long offset(long mm, long offset) throws Error
    Deprecated.
    Move the pointer into the mmap'ed file to the specified offset.
    Parameters:
      `mm` - The mmap'ed file.
      `offset` - The offset to move to.
    Returns:
      The pointer to the offset specified.
    Throws:
      `Error` - Error reading file