org.jruby.ext.ffi
Class Util

java.lang.Object
  extended by org.jruby.ext.ffi.Util

public final class Util
extends java.lang.Object


Method Summary
static void checkBounds(Ruby runtime, long size, long off, long len)
           
static void checkStringSafety(Ruby runtime, IRubyObject value)
           
static
<T> T
convertParameter(IRubyObject parameter, java.lang.Class<T> paramClass)
           
static double doubleValue(IRubyObject parameter)
           
static float floatValue(IRubyObject parameter)
           
static short int16Value(IRubyObject parameter)
           
static int int32Value(IRubyObject parameter)
           
static long int64Value(IRubyObject parameter)
           
static byte int8Value(IRubyObject parameter)
           
static long longValue(IRubyObject parameter)
          Converts characters like 'a' or 't' to an integer value
static IRubyObject newSigned16(Ruby runtime, int value)
           
static IRubyObject newSigned32(Ruby runtime, int value)
           
static IRubyObject newSigned64(Ruby runtime, long value)
           
static IRubyObject newSigned8(Ruby runtime, int value)
           
static IRubyObject newUnsigned16(Ruby runtime, int value)
           
static IRubyObject newUnsigned32(Ruby runtime, int value)
           
static IRubyObject newUnsigned64(Ruby runtime, long value)
           
static IRubyObject newUnsigned8(Ruby runtime, int value)
           
static java.nio.ByteBuffer slice(java.nio.ByteBuffer buf, int offset)
           
static int uint16Value(IRubyObject parameter)
           
static long uint32Value(IRubyObject parameter)
           
static long uint64Value(IRubyObject parameter)
           
static short uint8Value(IRubyObject parameter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

int8Value

public static final byte int8Value(IRubyObject parameter)

uint8Value

public static final short uint8Value(IRubyObject parameter)

int16Value

public static final short int16Value(IRubyObject parameter)

uint16Value

public static final int uint16Value(IRubyObject parameter)

int32Value

public static final int int32Value(IRubyObject parameter)

uint32Value

public static final long uint32Value(IRubyObject parameter)

int64Value

public static final long int64Value(IRubyObject parameter)

uint64Value

public static final long uint64Value(IRubyObject parameter)

floatValue

public static final float floatValue(IRubyObject parameter)

doubleValue

public static final double doubleValue(IRubyObject parameter)

longValue

public static final long longValue(IRubyObject parameter)
Converts characters like 'a' or 't' to an integer value

Parameters:
parameter -
Returns:

newSigned8

public static final IRubyObject newSigned8(Ruby runtime,
                                           int value)

newUnsigned8

public static final IRubyObject newUnsigned8(Ruby runtime,
                                             int value)

newSigned16

public static final IRubyObject newSigned16(Ruby runtime,
                                            int value)

newUnsigned16

public static final IRubyObject newUnsigned16(Ruby runtime,
                                              int value)

newSigned32

public static final IRubyObject newSigned32(Ruby runtime,
                                            int value)

newUnsigned32

public static final IRubyObject newUnsigned32(Ruby runtime,
                                              int value)

newSigned64

public static final IRubyObject newSigned64(Ruby runtime,
                                            long value)

newUnsigned64

public static final IRubyObject newUnsigned64(Ruby runtime,
                                              long value)

convertParameter

public static final <T> T convertParameter(IRubyObject parameter,
                                           java.lang.Class<T> paramClass)

slice

public static final java.nio.ByteBuffer slice(java.nio.ByteBuffer buf,
                                              int offset)

checkStringSafety

public static final void checkStringSafety(Ruby runtime,
                                           IRubyObject value)

checkBounds

public static final void checkBounds(Ruby runtime,
                                     long size,
                                     long off,
                                     long len)


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