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.


Field Summary
 
Fields inherited from class org.jruby.ext.ffi.InvalidMemoryIO
runtime
 
Constructor Summary
NullMemoryIO(Ruby runtime)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 long getAddress()
           
protected  RubyClass getErrorClass(Ruby runtime)
           
 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
asByteBuffer, clear, ex, 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
asByteBuffer, 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

getErrorClass

protected RubyClass getErrorClass(Ruby runtime)
Overrides:
getErrorClass in class InvalidMemoryIO

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-2009 JRuby Team. All Rights Reserved.