Package org.jruby.ext.ffi
Class Util
java.lang.Object
org.jruby.ext.ffi.Util
-
Method Summary
Modifier and TypeMethodDescriptionstatic final voidcheckBounds(Ruby runtime, long size, long off, long len) static final <T> TconvertParameter(IRubyObject parameter, Class<T> paramClass) Deprecated.static final doubledoubleValue(IRubyObject parameter) Deprecated.static final doubledoubleValue(ThreadContext context, IRubyObject parameter) static TypefindType(ThreadContext context, IRubyObject name) static TypefindType(ThreadContext context, IRubyObject name, IRubyObject typeMap) static final floatfloatValue(IRubyObject parameter) Deprecated.static final floatfloatValue(ThreadContext context, IRubyObject parameter) static final shortint16Value(IRubyObject parameter) static final intint32Value(IRubyObject parameter) static final longint64Value(IRubyObject parameter) static final byteint8Value(IRubyObject parameter) static intintValue(IRubyObject obj, RubyHash enums) Deprecated.static final longlongValue(IRubyObject parameter) Converts characters like 'a' or 't' to an integer valuestatic final IRubyObjectnewSigned16(Ruby runtime, short value) static final IRubyObjectnewSigned32(Ruby runtime, int value) static final IRubyObjectnewSigned64(Ruby runtime, long value) static final IRubyObjectnewSigned8(Ruby runtime, byte value) static final IRubyObjectnewUnsigned16(Ruby runtime, short value) static final IRubyObjectnewUnsigned32(Ruby runtime, int value) static final IRubyObjectnewUnsigned64(Ruby runtime, long value) static final IRubyObjectnewUnsigned8(Ruby runtime, byte value) static ByteOrderparseByteOrder(Ruby runtime, IRubyObject byte_order) static introundUpToPowerOfTwo(int v) static final ByteBufferslice(ByteBuffer buf, int offset) static final intuint16Value(IRubyObject parameter) static final longuint32Value(IRubyObject parameter) static final longuint64Value(IRubyObject parameter) static final shortuint8Value(IRubyObject parameter) static final longulongValue(IRubyObject parameter)
-
Method Details
-
int8Value
-
uint8Value
-
int16Value
-
uint16Value
-
int32Value
-
uint32Value
-
int64Value
-
uint64Value
-
floatValue
Deprecated. -
floatValue
-
doubleValue
Deprecated. -
doubleValue
-
longValue
Converts characters like 'a' or 't' to an integer value- Parameters:
parameter-- Returns:
-
intValue
Deprecated. -
ulongValue
-
newSigned8
-
newUnsigned8
-
newSigned16
-
newUnsigned16
-
newSigned32
-
newUnsigned32
-
newSigned64
-
newUnsigned64
-
convertParameter
Deprecated. -
slice
-
checkBounds
-
findType
-
findType
-
parseByteOrder
-
roundUpToPowerOfTwo
public static int roundUpToPowerOfTwo(int v)
-