|
The Meta-Environment API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttoolbus.util.NativeTypeConverter
public class NativeTypeConverter
This class handles the conversion of native types from and to their byte representation.
| Field Summary | |
|---|---|
private static int |
BYTEMASK
|
| Constructor Summary | |
|---|---|
private |
NativeTypeConverter()
Default constructor. |
| Method Summary | |
|---|---|
static byte[] |
makeBytesFromInt(int fourByteNumber)
Splits the given int value into four separate bytes (little endian encoded). |
static byte[] |
makeBytesFromUnsignedShort(int twoByteNumber)
Splits the given unsigned short value into two separate bytes (little endian encoded). |
static int |
makeInt(byte[] intBytes)
Merges four (little endian encoded) bytes into a int value. |
static int |
makeUnsignedShort(byte[] shortBytes)
Merges two (little endian encoded) bytes into a unsigned short value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int BYTEMASK
| Constructor Detail |
|---|
private NativeTypeConverter()
| Method Detail |
|---|
public static int makeUnsignedShort(byte[] shortBytes)
shortBytes - The two (little endian encoded) bytes.
public static byte[] makeBytesFromUnsignedShort(int twoByteNumber)
twoByteNumber - The short that needs to be split.
public static int makeInt(byte[] intBytes)
intBytes - The four (little endian encoded) bytes.
public static byte[] makeBytesFromInt(int fourByteNumber)
fourByteNumber - The int that needs to be split.
|
The Meta-Environment API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||