LibJClass Reference Manual |
---|
Byte Order Macros — A portable way to read big-endian integers.
#include <jclass/types.h> #define UINT16_NATIVE (val) #define INT16_NATIVE (val) #define UINT32_NATIVE (val) #define INT32_NATIVE (val)
Java uses big-endian byte ordering exclusively. libjclass always converts everything to native byte order so you might not need these macros. However, if you need to interprete an unknown attribute these macros will come in handy.
#define UINT16_NATIVE(val)
Converts an unsigned 16-bit big-endian integer to the native byte order.
val : | An unsigned 16-bit big-endian integer. |
#define INT16_NATIVE(val)
Converts a signed 16-bit big-endian integer to the native byte order.
val : | A signed 16-bit big-endian integer. |
#define UINT32_NATIVE(val)
Converts an unsigned 32-bit big-endian integer to the native byte order.
val : | An unsigned 32-bit big-endian integer. |
<< Fundamentals | String functions >> |