|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jniwrapper.PlatformContext
Provides an information on platform dependent type sizes etc.
Method Summary | |
static double |
convertCDoubleToDouble(byte[] arr)
Converts a native byte representation of a double precision floating point value to a double . |
static double |
convertCFloatToDouble(byte[] arr)
Converts a native byte representation of a single precision floating point value to a double . |
static double |
convertCLongDoubleToDouble(byte[] arr)
Converts a native byte representation of a long double precision floating point value to a double . |
static byte[] |
convertDoubleToCDouble(double d)
Converts a double precision floating point value to platform native byte representation. |
static byte[] |
convertDoubleToCFloat(double f)
Converts a single precision floating point value to platform native byte representation. |
static byte[] |
convertDoubleToCLongDouble(double d)
Converts a double precision floating point value to platform native byte representation of long double type. |
static int |
getAlignedParameterLength(int paramLen)
Returns length of the aligned parameter on the stack. |
static int |
getAlignedParameterLength(Parameter p)
Returns length of the aligned parameter on the stack. |
static int |
getAlignedPointerLength()
Returns length of the aligned pointer on the stack. |
static int |
getBoolLength()
Returns bool type length ( sizeof(bool) ). |
static int |
getCharLength()
Returns character length ( sizeof(char) ). |
static byte |
getDefaultCallingConvention()
Returns platform default calling conventions for libraries. |
static short |
getDefaultStructureAlignment()
Returns platform required structure alignment. |
static int |
getDoubleLength()
Returns double precision floating point value length ( sizeof(double) ). |
static int |
getFloatLength()
Returns single precision floating point value length ( sizeof(float) ). |
static int |
getIntLength()
Returns integer length ( sizeof(int) ). |
static int |
getLongDoubleLength()
Returns long double precision floating point value length ( sizeof(long double) ). |
static int |
getLongLength()
Returns long integer length ( sizeof(long) ). |
static short |
getParameterAlignment()
Returns platform default parameter alignment for function calls. |
static int |
getPointerLength()
Returns pointer length ( sizeof(void*) ). |
static int |
getShortLength()
Returns short integer length ( sizeof(short) ). |
static int |
getWideCharLength()
Returns wide character length ( sizeof(wchar_t) ). |
static boolean |
isLittleEndian()
Returns true if the underlying platform byte order is little endian,
that is it stores the least significant byte of a value first. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static int getCharLength()
sizeof(char)
).
public static int getWideCharLength()
sizeof(wchar_t)
).
public static int getBoolLength()
sizeof(bool)
).
public static int getPointerLength()
sizeof(void*)
).
public static int getShortLength()
sizeof(short)
).
public static int getIntLength()
sizeof(int)
).
public static int getLongLength()
sizeof(long)
).
public static int getFloatLength()
sizeof(float)
).
public static int getDoubleLength()
sizeof(double)
).
public static int getLongDoubleLength()
sizeof(long double)
).
On certain platforms long double
can be the same as double
.
public static boolean isLittleEndian()
true
if the underlying platform byte order is little endian,
that is it stores the least significant byte of a value first.
public static short getParameterAlignment()
public static short getDefaultStructureAlignment()
public static byte getDefaultCallingConvention()
public static byte[] convertDoubleToCFloat(double f)
public static double convertCFloatToDouble(byte[] arr)
double
.
public static byte[] convertDoubleToCDouble(double d)
public static double convertCDoubleToDouble(byte[] arr)
double
.
public static byte[] convertDoubleToCLongDouble(double d)
long double
type.
public static double convertCLongDoubleToDouble(byte[] arr)
double
. This conversion may lead to a value loss if java double has not enough
precision.
public static int getAlignedPointerLength()
public static int getAlignedParameterLength(int paramLen)
paramLen
- unaligned length of the parameter.public static int getAlignedParameterLength(Parameter p)
p
- the parameter.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |