public class Util extends Object
Modifier | Constructor and Description |
---|---|
private |
Util() |
Modifier and Type | Method and Description |
---|---|
static float |
get4ByteFloat(int i1,
int i2,
int i3,
int i4)
Transform 4 bytes in a float.
|
static int |
getIntFromBytes(int... x)
Transform a series of bytes in an int.
|
public static int getIntFromBytes(int... x)
x
- ints representing bytesIllegalArgumentException
- if at least one of the ints does not
represent a byte, ie its value does not belong to the range [0, 255]public static float get4ByteFloat(int i1, int i2, int i3, int i4)
The 32 bits are converted according to the IEEE 754 floating-point
"single format" bit layout, using the Float.intBitsToFloat(int)
method.
i1
- valore compreso nell'intervallo [0,255]i2
- valore compreso nell'intervallo [0,255]i3
- valore compreso nell'intervallo [0,255]i4
- valore compreso nell'intervallo [0,255]© 2013 andynaz - http://andynaz.altervista.org