org.python.modules.jffi
Class NullMemory

java.lang.Object
  extended by org.python.modules.jffi.InvalidMemory
      extended by 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
NullMemory()
           
 
Method Summary
 boolean equals(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(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Jython homepage