org.jruby.ext.ffi
Class NullMemoryIO

java.lang.Object
  extended by org.jruby.ext.ffi.InvalidMemoryIO
      extended by org.jruby.ext.ffi.NullMemoryIO
All Implemented Interfaces:
DirectMemoryIO, MemoryIO

public class NullMemoryIO
extends InvalidMemoryIO
implements DirectMemoryIO

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


Constructor Summary
NullMemoryIO(Ruby runtime)
           
 
Method Summary
 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.jruby.ext.ffi.InvalidMemoryIO
clear, get, get, get, get, get, get, getAddress, getByte, getDouble, getFloat, getInt, getLong, getMemoryIO, getNativeLong, getShort, getZeroTerminatedByteArray, getZeroTerminatedByteArray, indexOf, indexOf, put, put, put, put, put, put, putAddress, putByte, putDouble, putFloat, putInt, putLong, putMemoryIO, putNativeLong, putShort, putZeroTerminatedByteArray, setMemory, slice
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jruby.ext.ffi.MemoryIO
get, get, get, get, get, get, getAddress, getByte, getDouble, getFloat, getInt, getLong, getMemoryIO, getNativeLong, getShort, getZeroTerminatedByteArray, getZeroTerminatedByteArray, indexOf, indexOf, put, put, put, put, put, put, putAddress, putByte, putDouble, putFloat, putInt, putLong, putMemoryIO, putNativeLong, putShort, putZeroTerminatedByteArray, setMemory, slice
 

Constructor Detail

NullMemoryIO

public NullMemoryIO(Ruby runtime)
Method Detail

getAddress

public long getAddress()
Specified by:
getAddress in interface DirectMemoryIO

isNull

public boolean isNull()
Description copied from interface: MemoryIO
Checks if the memory area is NULL.

Specified by:
isNull in interface MemoryIO
Returns:
true if the memory area is invalid.

isDirect

public final boolean isDirect()
Description copied from interface: MemoryIO
Checks if the memory area is a native memory pointer.

Specified by:
isDirect in interface MemoryIO
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


Copyright © 2002-2007 JRuby Team. All Rights Reserved.