# Class VulkanLWJGLMappedMemory

java.lang.Object
com.io7m.jcoronado.lwjgl.internal.VulkanLWJGLMappedMemory

All Implemented Interfaces:
  `VulkanMappedMemoryType`, `AutoCloseable`

public final class VulkanLWJGLMappedMemory extends Object implements VulkanMappedMemoryType
A section of mapped memory.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ByteBuffer`
  `asByteBuffer()`
  `void`
  `close()`
  Unmap the memory.
  `void`
  `flush()`
  Flush this mapped memory.
  `void`
  `flushRange(long offset, long size)`
  Flush the given memory range.
  `boolean`
  `isMapped()`

  ### Methods inherited from class java.lang.Object

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

- ## Method Details

  - ### isMapped

    public boolean isMapped()
    Specified by:
      `isMapped` in interface `VulkanMappedMemoryType`
    Returns:
      `true` iff `VulkanMappedMemoryType.close()` has not been called

  - ### flushRange

    public void flushRange(long offset, long size) throws VulkanException
    Description copied from interface: `VulkanMappedMemoryType`
    Flush the given memory range.
    Specified by:
      `flushRange` in interface `VulkanMappedMemoryType`
    Parameters:
      `offset` - The offset
      `size` - The size
    Throws:
      `VulkanException` - On errors
    See Also:
      - `VulkanLogicalDeviceType.flushMappedMemoryRange(VulkanMappedMemoryRange)`

  - ### flush

    public void flush() throws VulkanException
    Description copied from interface: `VulkanMappedMemoryType`
    Flush this mapped memory.
    Specified by:
      `flush` in interface `VulkanMappedMemoryType`
    Throws:
      `VulkanException` - On errors
    See Also:
      - `VulkanLogicalDeviceType.flushMappedMemoryRange(VulkanMappedMemoryRange)`

  - ### close

    public void close()
    Description copied from interface: `VulkanMappedMemoryType`
    Unmap the memory.
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `VulkanMappedMemoryType`

  - ### asByteBuffer

    public ByteBuffer asByteBuffer()
    Specified by:
      `asByteBuffer` in interface `VulkanMappedMemoryType`
    Returns:
      The mapped memory as a byte buffer