org.jruby.ext.ffi.jna
Class JNAMemoryIO

java.lang.Object
  extended by org.jruby.ext.ffi.jna.JNAMemoryIO
All Implemented Interfaces:
MemoryIO

public abstract class JNAMemoryIO
extends java.lang.Object
implements MemoryIO

JNA implementation of memory I/O operations.


Method Summary
 boolean equals(java.lang.Object obj)
           
abstract  Pointer getAddress()
           
 JNAMemoryIO getMemoryIO(long offset)
          Reads a pointer value at the specified offset within the memory area, and wraps it in an abstract memory accessor.
abstract  Pointer getPointer(long offset)
           
 int hashCode()
           
 void putMemoryIO(long offset, MemoryIO value)
          Writes a pointer value to the memory area at the specified offset.
abstract  void putPointer(long offset, Pointer value)
           
abstract  JNAMemoryIO slice(long offset)
           
 
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
clear, get, get, get, get, get, get, getByte, getDouble, getFloat, getInt, getLong, getNativeLong, getShort, indexOf, indexOf, isNull, put, put, put, put, put, put, putByte, putDouble, putFloat, putInt, putLong, putNativeLong, putShort, setMemory
 

Method Detail

getAddress

public abstract Pointer getAddress()

getPointer

public abstract Pointer getPointer(long offset)

putPointer

public abstract void putPointer(long offset,
                                Pointer value)

slice

public abstract JNAMemoryIO slice(long offset)

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

getMemoryIO

public JNAMemoryIO getMemoryIO(long offset)
Description copied from interface: MemoryIO
Reads a pointer value at the specified offset within the memory area, and wraps it in an abstract memory accessor.

Specified by:
getMemoryIO in interface MemoryIO
Parameters:
offset - The offset within the memory area to read the value.
Returns:
A MemoryIO accessor that can be used to access the memory pointed to by the address.

putMemoryIO

public void putMemoryIO(long offset,
                        MemoryIO value)
Description copied from interface: MemoryIO
Writes a pointer value to the memory area at the specified offset.

Specified by:
putMemoryIO in interface MemoryIO
Parameters:
offset - The offset within the memory area to write the value.
value - The pointer value to write to the memory location.


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