org.jruby.ext.ffi
Class AbstractMemory

java.lang.Object
  extended by org.jruby.RubyBasicObject
      extended by org.jruby.RubyObject
          extended by org.jruby.ext.ffi.AbstractMemory
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<IRubyObject>, InstanceVariables, InternalVariables, IRubyObject, CoreObjectType
Direct Known Subclasses:
Buffer, Pointer

public abstract class AbstractMemory
extends RubyObject

A abstract memory object that defines operations common to both pointers and memory buffers

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.ObjectMethods
 
Nested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.BasicObjectMethods, RubyBasicObject.Finalizer
 
Field Summary
static java.lang.String ABSTRACT_MEMORY_RUBY_CLASS
           
protected  MemoryIO io
          The Memory I/O object
protected  long size
          The total size of the memory area
protected  int typeSize
          The size of each element of this memory area - e.g.
 
Fields inherited from class org.jruby.RubyObject
OBJECT_ALLOCATOR
 
Fields inherited from class org.jruby.RubyBasicObject
ALL_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, NEVER, NIL_F, TAINTED_F, UNDEF, UNTRUSTED_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
protected AbstractMemory(Ruby runtime, RubyClass klass, MemoryIO io, long size)
           
protected AbstractMemory(Ruby runtime, RubyClass klass, MemoryIO io, long size, int typeSize)
           
 
Method Summary
 IRubyObject aref(ThreadContext context, IRubyObject indexArg)
           
protected static int calculateSize(ThreadContext context, IRubyObject sizeArg)
           
protected static RubyArray checkArray(IRubyObject obj)
           
 IRubyObject clear(ThreadContext context)
          Clears (zeros out) the memory contents.
static RubyClass createAbstractMemoryClass(Ruby runtime, RubyModule module)
           
 boolean eql(IRubyObject other)
          method used for Hash key comparison (specialized for String, Symbol and Fixnum) Will by default just call the Ruby method "eql?"
 boolean equals(java.lang.Object obj)
          Compares this MemoryPointer to another MemoryPointer.
 IRubyObject get_array_of_float(ThreadContext context, IRubyObject offset, IRubyObject length)
           
 IRubyObject get_array_of_float64(ThreadContext context, IRubyObject offset, IRubyObject length)
           
 IRubyObject get_array_of_int16(ThreadContext context, IRubyObject offset, IRubyObject length)
           
 IRubyObject get_array_of_int32(ThreadContext context, IRubyObject offset, IRubyObject length)
           
 IRubyObject get_array_of_int64(ThreadContext context, IRubyObject offset, IRubyObject length)
           
 IRubyObject get_array_of_int8(ThreadContext context, IRubyObject offset, IRubyObject length)
           
 IRubyObject get_array_of_long(ThreadContext context, IRubyObject offset, IRubyObject length)
           
 IRubyObject get_array_of_pointer(ThreadContext context, IRubyObject offset, IRubyObject length)
           
 IRubyObject get_array_of_string(ThreadContext context, IRubyObject rbOffset)
           
 IRubyObject get_array_of_string(ThreadContext context, IRubyObject rbOffset, IRubyObject rbCount)
           
 IRubyObject get_bytes(ThreadContext context, IRubyObject offArg, IRubyObject lenArg)
           
 IRubyObject get_float32(ThreadContext context, IRubyObject offset)
          Reads a 32 bit floating point value from the memory address.
 IRubyObject get_float64(ThreadContext context, IRubyObject offset)
          Reads a 64 bit floating point value from the memory address.
 IRubyObject get_int16(ThreadContext context, IRubyObject offset)
          Reads a 16 bit signed integer value from the memory address.
 IRubyObject get_int32(ThreadContext context, IRubyObject offset)
          Reads a 32 bit signed integer value from the memory address.
 IRubyObject get_int64(ThreadContext context, IRubyObject offset)
          Reads a 64 bit integer value from the memory address.
 IRubyObject get_int8(ThreadContext context, IRubyObject offset)
          Reads an 8 bit signed integer value from the memory address.
 IRubyObject get_long(ThreadContext context, IRubyObject offset)
          Reads a C long integer value from the memory area.
 IRubyObject get_pointer(ThreadContext context, IRubyObject offset)
           
 IRubyObject get_string(ThreadContext context, IRubyObject offArg)
           
 IRubyObject get_string(ThreadContext context, IRubyObject offArg, IRubyObject lenArg)
           
 IRubyObject get_uint16(ThreadContext context, IRubyObject offset)
          Reads a 16 bit unsigned integer value from the memory address.
 IRubyObject get_uint32(ThreadContext context, IRubyObject offset)
          Reads a 32 bit unsigned integer value from the memory address.
 IRubyObject get_uint64(ThreadContext context, IRubyObject offset)
          Reads a 64 bit unsigned integer value from the memory address.
 IRubyObject get_uint8(ThreadContext context, IRubyObject offset)
          Reads an 8 bit unsigned integer value from the memory address.
 IRubyObject get_ulong(ThreadContext context, IRubyObject offset)
          Reads a C unsigned long integer value from the memory area.
 MemoryIO getMemoryIO()
          Gets the memory I/O accessor to read/write to the memory area.
protected  long getOffset(IRubyObject offset)
          Calculates the absoluate offset within the base memory pointer for a given offset.
protected abstract  Pointer getPointer(Ruby runtime, long offset)
           
protected  long getSize()
          Gets the size of the memory area.
 RubyFixnum hash(ThreadContext context)
          Calculates a hash code for the pointer.
 int hashCode()
          Calculates the hash code for this MemoryPointer
 IRubyObject op_equal(ThreadContext context, IRubyObject obj)
          rb_obj_equal Will by default use identity equality to compare objects.
 IRubyObject op_plus(ThreadContext context, IRubyObject value)
           
 IRubyObject put_array_of_float(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
           
 IRubyObject put_array_of_float64(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
           
 IRubyObject put_array_of_int16(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
           
 IRubyObject put_array_of_int32(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
           
 IRubyObject put_array_of_int64(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
           
 IRubyObject put_array_of_int8(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
           
 IRubyObject put_array_of_long(ThreadContext context, IRubyObject offset, IRubyObject arr)
           
 IRubyObject put_array_of_pointer(ThreadContext context, IRubyObject offset, IRubyObject arrParam)
           
 IRubyObject put_bytes(ThreadContext context, IRubyObject[] args)
           
 IRubyObject put_callback(ThreadContext context, IRubyObject offset, IRubyObject proc, IRubyObject cbInfo)
           
 IRubyObject put_float32(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes an 32 bit floating point value to the memory area.
 IRubyObject put_float64(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes an 64 bit floating point value to the memory area.
 IRubyObject put_int16(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes a 16 bit signed integer value to the memory address.
 IRubyObject put_int32(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes a 32 bit signed integer value to the memory address.
 IRubyObject put_int64(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes a 64 bit integer value to the memory area.
 IRubyObject put_int8(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes a 8 bit signed integer value to the memory area.
 IRubyObject put_long(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes a C long integer value to the memory area.
 IRubyObject put_pointer(ThreadContext context, IRubyObject offset, IRubyObject value)
           
 IRubyObject put_string(ThreadContext context, IRubyObject offArg, IRubyObject strArg)
           
 IRubyObject put_uint16(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes a 16 bit unsigned integer value to the memory address.
 IRubyObject put_uint32(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes an 32 bit unsigned integer value to the memory address.
 IRubyObject put_uint64(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes a 64 bit unsigned integer value to the memory area.
 IRubyObject put_uint8(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes a 8 bit unsigned integer value to the memory area.
 IRubyObject put_ulong(ThreadContext context, IRubyObject offset, IRubyObject value)
          Writes a C long integer value to the memory area.
 IRubyObject read_string(ThreadContext context)
           
 IRubyObject read_string(ThreadContext context, IRubyObject rbLength)
           
protected abstract  AbstractMemory slice(Ruby runtime, long offset)
           
 IRubyObject to_s(ThreadContext context, IRubyObject[] args)
           
 IRubyObject total(ThreadContext context)
          Gets the total size (in bytes) of the MemoryPointer.
 IRubyObject type_size(ThreadContext context)
          Indicates how many bytes the intrinsic type of the memory uses.
 
Methods inherited from class org.jruby.RubyObject
as, attachToObjectSpace, callInit, checkFrozen, convertToType, createObjectClass, display, dup, eql_p, eqlInternal, equal_p, equalInternal, evalUnder, evalUnder, extend, freeze, frozen_p, getNativeTypeIndex, hash, id_deprecated, id, initialize_copy, initialize, inspect, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, kind_of_p, method, methods, nil_p, op_eqq, op_match, private_methods, protected_methods, public_methods, puts, rbClone, remove_instance_variable, respond_to_p, respond_to_p, send, send, send, send, send, singleton_methods, singleton_methods19, singletonMethods, specificEval, specificEval, specificEval, specificEval, specificEval, taint, tainted_p, to_a, to_java, to_s, toString, trust, type_deprecated, type, untaint, untrust, untrusted_p, validateInstanceVariable
 
Methods inherited from class org.jruby.RubyBasicObject
addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkStringType, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataWrapStruct, ensureInstanceVariablesSettable, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, getFlag, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMetaClass, getRuntime, getSingletonClass, getSingletonClassClone, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hasInstanceVariable, hasInternalVariable, hasVariables, infectBy, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isTaint, isTrue, isUntrusted, makeMetaClass, op_not_equal, op_not, removeFinalizers, removeInstanceVariable, removeInternalVariable, respondsTo, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setTaint, setUntrusted, setVariable, syncVariables, taint, testFrozen, testFrozen, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableGetSize, variableTableRemove, variableTableStore, variableTableSync
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ABSTRACT_MEMORY_RUBY_CLASS

public static final java.lang.String ABSTRACT_MEMORY_RUBY_CLASS
See Also:
Constant Field Values

size

protected final long size
The total size of the memory area


typeSize

protected final int typeSize
The size of each element of this memory area - e.g. :char is 1, :int is 4


io

protected final MemoryIO io
The Memory I/O object

Constructor Detail

AbstractMemory

protected AbstractMemory(Ruby runtime,
                         RubyClass klass,
                         MemoryIO io,
                         long size)

AbstractMemory

protected AbstractMemory(Ruby runtime,
                         RubyClass klass,
                         MemoryIO io,
                         long size,
                         int typeSize)
Method Detail

createAbstractMemoryClass

public static RubyClass createAbstractMemoryClass(Ruby runtime,
                                                  RubyModule module)

calculateSize

protected static final int calculateSize(ThreadContext context,
                                         IRubyObject sizeArg)

checkArray

protected static final RubyArray checkArray(IRubyObject obj)

getMemoryIO

public final MemoryIO getMemoryIO()
Gets the memory I/O accessor to read/write to the memory area.

Returns:
A memory accessor.

getOffset

protected final long getOffset(IRubyObject offset)
Calculates the absoluate offset within the base memory pointer for a given offset.

Parameters:
offset - The offset to add to the base offset.
Returns:
The total offset from the base memory pointer.

getSize

protected final long getSize()
Gets the size of the memory area.

Returns:
The size of the memory area.

hash

public RubyFixnum hash(ThreadContext context)
Calculates a hash code for the pointer.

Returns:
A RubyFixnum containing the hash code.

to_s

public IRubyObject to_s(ThreadContext context,
                        IRubyObject[] args)

aref

public final IRubyObject aref(ThreadContext context,
                              IRubyObject indexArg)

equals

public boolean equals(java.lang.Object obj)
Compares this MemoryPointer to another MemoryPointer.

Overrides:
equals in class RubyObject
Parameters:
obj - The other MemoryPointer to compare to.
Returns:
true if the memory address of obj is equal to the address of this MemoryPointer.

op_equal

public IRubyObject op_equal(ThreadContext context,
                            IRubyObject obj)
Description copied from class: RubyObject
rb_obj_equal Will by default use identity equality to compare objects. This follows the Ruby semantics.

Specified by:
op_equal in interface IRubyObject
Overrides:
op_equal in class RubyObject

eql

public final boolean eql(IRubyObject other)
Description copied from class: RubyBasicObject
method used for Hash key comparison (specialized for String, Symbol and Fixnum) Will by default just call the Ruby method "eql?"

Specified by:
eql in interface IRubyObject
Overrides:
eql in class RubyBasicObject

hashCode

public int hashCode()
Calculates the hash code for this MemoryPointer

Overrides:
hashCode in class RubyObject
Returns:
The hashcode of the memory address.

clear

public IRubyObject clear(ThreadContext context)
Clears (zeros out) the memory contents.


total

public IRubyObject total(ThreadContext context)
Gets the total size (in bytes) of the MemoryPointer.

Returns:
The total size in bytes.

type_size

public final IRubyObject type_size(ThreadContext context)
Indicates how many bytes the intrinsic type of the memory uses.

Parameters:
context -
Returns:

put_int8

public IRubyObject put_int8(ThreadContext context,
                            IRubyObject offset,
                            IRubyObject value)
Writes a 8 bit signed integer value to the memory area.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_int8

public IRubyObject get_int8(ThreadContext context,
                            IRubyObject offset)
Reads an 8 bit signed integer value from the memory address.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read from the address.

put_uint8

public IRubyObject put_uint8(ThreadContext context,
                             IRubyObject offset,
                             IRubyObject value)
Writes a 8 bit unsigned integer value to the memory area.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_uint8

public IRubyObject get_uint8(ThreadContext context,
                             IRubyObject offset)
Reads an 8 bit unsigned integer value from the memory address.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read from the address.

put_int16

public IRubyObject put_int16(ThreadContext context,
                             IRubyObject offset,
                             IRubyObject value)
Writes a 16 bit signed integer value to the memory address.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_int16

public IRubyObject get_int16(ThreadContext context,
                             IRubyObject offset)
Reads a 16 bit signed integer value from the memory address.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read from the address.

put_uint16

public IRubyObject put_uint16(ThreadContext context,
                              IRubyObject offset,
                              IRubyObject value)
Writes a 16 bit unsigned integer value to the memory address.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_uint16

public IRubyObject get_uint16(ThreadContext context,
                              IRubyObject offset)
Reads a 16 bit unsigned integer value from the memory address.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read from the address.

put_int32

public IRubyObject put_int32(ThreadContext context,
                             IRubyObject offset,
                             IRubyObject value)
Writes a 32 bit signed integer value to the memory address.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_int32

public IRubyObject get_int32(ThreadContext context,
                             IRubyObject offset)
Reads a 32 bit signed integer value from the memory address.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read from the address.

put_uint32

public IRubyObject put_uint32(ThreadContext context,
                              IRubyObject offset,
                              IRubyObject value)
Writes an 32 bit unsigned integer value to the memory address.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_uint32

public IRubyObject get_uint32(ThreadContext context,
                              IRubyObject offset)
Reads a 32 bit unsigned integer value from the memory address.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read from the address.

put_int64

public IRubyObject put_int64(ThreadContext context,
                             IRubyObject offset,
                             IRubyObject value)
Writes a 64 bit integer value to the memory area.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_int64

public IRubyObject get_int64(ThreadContext context,
                             IRubyObject offset)
Reads a 64 bit integer value from the memory address.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read from the address.

put_uint64

public IRubyObject put_uint64(ThreadContext context,
                              IRubyObject offset,
                              IRubyObject value)
Writes a 64 bit unsigned integer value to the memory area.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_uint64

public IRubyObject get_uint64(ThreadContext context,
                              IRubyObject offset)
Reads a 64 bit unsigned integer value from the memory address.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read from the address.

put_long

public IRubyObject put_long(ThreadContext context,
                            IRubyObject offset,
                            IRubyObject value)
Writes a C long integer value to the memory area.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_long

public IRubyObject get_long(ThreadContext context,
                            IRubyObject offset)
Reads a C long integer value from the memory area.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read.

put_ulong

public IRubyObject put_ulong(ThreadContext context,
                             IRubyObject offset,
                             IRubyObject value)
Writes a C long integer value to the memory area.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_ulong

public IRubyObject get_ulong(ThreadContext context,
                             IRubyObject offset)
Reads a C unsigned long integer value from the memory area.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read.

put_float32

public IRubyObject put_float32(ThreadContext context,
                               IRubyObject offset,
                               IRubyObject value)
Writes an 32 bit floating point value to the memory area.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_float32

public IRubyObject get_float32(ThreadContext context,
                               IRubyObject offset)
Reads a 32 bit floating point value from the memory address.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read from the address.

put_float64

public IRubyObject put_float64(ThreadContext context,
                               IRubyObject offset,
                               IRubyObject value)
Writes an 64 bit floating point value to the memory area.

Parameters:
offset - The offset from the base pointer address to write the value.
value - The value to write.
Returns:
The value written.

get_float64

public IRubyObject get_float64(ThreadContext context,
                               IRubyObject offset)
Reads a 64 bit floating point value from the memory address.

Parameters:
offset - The offset from the base pointer address to read the value.
Returns:
The value read from the address.

get_array_of_int8

public IRubyObject get_array_of_int8(ThreadContext context,
                                     IRubyObject offset,
                                     IRubyObject length)

put_array_of_int8

public IRubyObject put_array_of_int8(ThreadContext context,
                                     IRubyObject offset,
                                     IRubyObject arrParam)

get_array_of_int16

public IRubyObject get_array_of_int16(ThreadContext context,
                                      IRubyObject offset,
                                      IRubyObject length)

put_array_of_int16

public IRubyObject put_array_of_int16(ThreadContext context,
                                      IRubyObject offset,
                                      IRubyObject arrParam)

get_array_of_int32

public IRubyObject get_array_of_int32(ThreadContext context,
                                      IRubyObject offset,
                                      IRubyObject length)

put_array_of_int32

public IRubyObject put_array_of_int32(ThreadContext context,
                                      IRubyObject offset,
                                      IRubyObject arrParam)

get_array_of_long

public IRubyObject get_array_of_long(ThreadContext context,
                                     IRubyObject offset,
                                     IRubyObject length)

put_array_of_long

public IRubyObject put_array_of_long(ThreadContext context,
                                     IRubyObject offset,
                                     IRubyObject arr)

get_array_of_int64

public IRubyObject get_array_of_int64(ThreadContext context,
                                      IRubyObject offset,
                                      IRubyObject length)

put_array_of_int64

public IRubyObject put_array_of_int64(ThreadContext context,
                                      IRubyObject offset,
                                      IRubyObject arrParam)

get_array_of_float

public IRubyObject get_array_of_float(ThreadContext context,
                                      IRubyObject offset,
                                      IRubyObject length)

put_array_of_float

public IRubyObject put_array_of_float(ThreadContext context,
                                      IRubyObject offset,
                                      IRubyObject arrParam)

get_array_of_float64

public IRubyObject get_array_of_float64(ThreadContext context,
                                        IRubyObject offset,
                                        IRubyObject length)

put_array_of_float64

public IRubyObject put_array_of_float64(ThreadContext context,
                                        IRubyObject offset,
                                        IRubyObject arrParam)

read_string

public IRubyObject read_string(ThreadContext context)

read_string

public IRubyObject read_string(ThreadContext context,
                               IRubyObject rbLength)

get_string

public IRubyObject get_string(ThreadContext context,
                              IRubyObject offArg)

get_string

public IRubyObject get_string(ThreadContext context,
                              IRubyObject offArg,
                              IRubyObject lenArg)

get_array_of_string

public IRubyObject get_array_of_string(ThreadContext context,
                                       IRubyObject rbOffset)

get_array_of_string

public IRubyObject get_array_of_string(ThreadContext context,
                                       IRubyObject rbOffset,
                                       IRubyObject rbCount)

put_string

public IRubyObject put_string(ThreadContext context,
                              IRubyObject offArg,
                              IRubyObject strArg)

get_bytes

public IRubyObject get_bytes(ThreadContext context,
                             IRubyObject offArg,
                             IRubyObject lenArg)

put_bytes

public IRubyObject put_bytes(ThreadContext context,
                             IRubyObject[] args)

get_pointer

public IRubyObject get_pointer(ThreadContext context,
                               IRubyObject offset)

put_pointer

public IRubyObject put_pointer(ThreadContext context,
                               IRubyObject offset,
                               IRubyObject value)

get_array_of_pointer

public IRubyObject get_array_of_pointer(ThreadContext context,
                                        IRubyObject offset,
                                        IRubyObject length)

put_array_of_pointer

public IRubyObject put_array_of_pointer(ThreadContext context,
                                        IRubyObject offset,
                                        IRubyObject arrParam)

put_callback

public IRubyObject put_callback(ThreadContext context,
                                IRubyObject offset,
                                IRubyObject proc,
                                IRubyObject cbInfo)

op_plus

public IRubyObject op_plus(ThreadContext context,
                           IRubyObject value)

slice

protected abstract AbstractMemory slice(Ruby runtime,
                                        long offset)

getPointer

protected abstract Pointer getPointer(Ruby runtime,
                                      long offset)


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