org.jruby.ext.ffi
Class Util
java.lang.Object
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
|
convertParameter(IRubyObject parameter,
java.lang.Class<T> paramClass)
Deprecated. |
static double |
doubleValue(IRubyObject parameter)
|
static Type |
findType(ThreadContext context,
IRubyObject name)
|
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 int |
intValue(IRubyObject obj,
RubyHash enums)
|
static long |
longValue(IRubyObject parameter)
Converts characters like 'a' or 't' to an integer value |
static IRubyObject |
newSigned16(Ruby runtime,
short value)
|
static IRubyObject |
newSigned32(Ruby runtime,
int value)
|
static IRubyObject |
newSigned64(Ruby runtime,
long value)
|
static IRubyObject |
newSigned8(Ruby runtime,
byte value)
|
static IRubyObject |
newUnsigned16(Ruby runtime,
short value)
|
static IRubyObject |
newUnsigned32(Ruby runtime,
int value)
|
static IRubyObject |
newUnsigned64(Ruby runtime,
long value)
|
static IRubyObject |
newUnsigned8(Ruby runtime,
byte value)
|
static java.nio.ByteOrder |
parseByteOrder(Ruby runtime,
IRubyObject byte_order)
|
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 |
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:
intValue
public static int intValue(IRubyObject obj,
RubyHash enums)
newSigned8
public static final IRubyObject newSigned8(Ruby runtime,
byte value)
newUnsigned8
public static final IRubyObject newUnsigned8(Ruby runtime,
byte value)
newSigned16
public static final IRubyObject newSigned16(Ruby runtime,
short value)
newUnsigned16
public static final IRubyObject newUnsigned16(Ruby runtime,
short 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
@Deprecated
public static final <T> T convertParameter(IRubyObject parameter,
java.lang.Class<T> paramClass)
- Deprecated.
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)
findType
public static final Type findType(ThreadContext context,
IRubyObject name)
parseByteOrder
public static java.nio.ByteOrder parseByteOrder(Ruby runtime,
IRubyObject byte_order)
Copyright © 2002-2009 JRuby Team. All Rights Reserved.