Package javaforce
Class LE
java.lang.Object
javaforce.LE
Little Endian get/set functions.
Usage : Windows files, Intel CPU style, etc.
Could use java.nio.ByteBuffer but sometimes this is faster.
Created : Dec 5, 2013
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]byteArray2intArray(byte[] in, int[] out) static short[]byteArray2shortArray(byte[] in, short[] out) static doublegetdouble(byte[] data, int offset) static floatgetfloat(byte[] data, int offset) static StringgetString(byte[] data, int offset, int len) static intgetuint16(byte[] data, int offset) static intgetuint32(byte[] data, int offset) static longgetuint64(byte[] data, int offset) static intgetuint8(byte[] data, int offset) static byte[]intArray2byteArray(int[] in, byte[] out) static voidsetdouble(byte[] data, int offset, double num) static voidsetfloat(byte[] data, int offset, float num) static voidstatic voidsetuint16(byte[] data, int offset, int num) static voidsetuint32(byte[] data, int offset, int num) static voidsetuint64(byte[] data, int offset, long num) static voidsetuint8(byte[] data, int offset, int num) static byte[]shortArray2byteArray(short[] in, byte[] out) static short[]swap(short[] input)
-
Constructor Details
-
LE
public LE()
-
-
Method Details
-
getuint8
public static int getuint8(byte[] data, int offset) -
getuint16
public static int getuint16(byte[] data, int offset) -
getuint32
public static int getuint32(byte[] data, int offset) -
getfloat
public static float getfloat(byte[] data, int offset) -
getuint64
public static long getuint64(byte[] data, int offset) -
getdouble
public static double getdouble(byte[] data, int offset) -
getString
-
setuint8
public static void setuint8(byte[] data, int offset, int num) -
setuint16
public static void setuint16(byte[] data, int offset, int num) -
setuint32
public static void setuint32(byte[] data, int offset, int num) -
setfloat
public static void setfloat(byte[] data, int offset, float num) -
setuint64
public static void setuint64(byte[] data, int offset, long num) -
setdouble
public static void setdouble(byte[] data, int offset, double num) -
setString
-
byteArray2shortArray
public static short[] byteArray2shortArray(byte[] in, short[] out) -
byteArray2intArray
public static int[] byteArray2intArray(byte[] in, int[] out) -
shortArray2byteArray
public static byte[] shortArray2byteArray(short[] in, byte[] out) -
intArray2byteArray
public static byte[] intArray2byteArray(int[] in, byte[] out) -
swap
public static short[] swap(short[] input)
-