NullMemory (Jython API documentation)
Date: 2022-09-10

org.python.modules.jffi

## Class NullMemory

- java.lang.Object
- - org.python.modules.jffi.InvalidMemory
  - - org.python.modules.jffi.NullMemory

- All Implemented Interfaces:
    DirectMemory, Memory

      public class NullMemory
      extends InvalidMemory
      implements DirectMemory

  An implementation of MemoryIO that throws an exception on any access.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NullMemory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `long` | `getAddress()`
    `int` | `hashCode()`
    `boolean` | `isDirect()` Checks if the memory area is a native memory pointer.
    `boolean` | `isNull()` Checks if the memory area is NULL.

    - ### Methods inherited from class org.python.modules.jffi.InvalidMemory

      `asByteBuffer, clear, get, get, get, get, get, get, getAddress, getByte, getDouble, getFloat, getInt, getLong, getMemory, getNativeLong, getShort, getZeroTerminatedByteArray, getZeroTerminatedByteArray, indexOf, indexOf, put, put, put, put, put, put, putAddress, putAddress, putByte, putDouble, putFloat, putInt, putLong, putMemory, putNativeLong, putShort, putZeroTerminatedByteArray, setMemory, slice`

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

      `getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.python.modules.jffi.Memory

      `get, get, get, get, get, get, getAddress, getByte, getDouble, getFloat, getInt, getLong, getMemory, getNativeLong, getShort, getZeroTerminatedByteArray, indexOf, indexOf, put, put, put, put, put, put, putAddress, putAddress, putByte, putDouble, putFloat, putInt, putLong, putNativeLong, putShort, putZeroTerminatedByteArray, setMemory, slice`

- - ### Constructor Detail

    - #### NullMemory

          public NullMemory()

  - ### Method Detail

    - #### getAddress

          public long getAddress()

      Specified by:
        `getAddress` in interface `DirectMemory`

    - #### isNull

          public boolean isNull()

      Description copied from interface: `Memory`
      Checks if the memory area is NULL.
      Specified by:
        `isNull` in interface `Memory`
      Returns:
        `true` if the memory area is invalid.

    - #### isDirect

          public final boolean isDirect()

      Description copied from interface: `Memory`
      Checks if the memory area is a native memory pointer.
      Specified by:
        `isDirect` in interface `Memory`
      Returns:
        `true` if the memory area is a native pointer.

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

Jython homepage