Package lejos.utility
Class EndianTools
- java.lang.Object
-
- lejos.utility.EndianTools
-
public class EndianTools extends java.lang.ObjectTools for manipulating numbers in little-endian and big-endian encodings
-
-
Constructor Summary
Constructors Constructor Description EndianTools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intdecodeIntBE(byte[] b, int off)static intdecodeIntLE(byte[] b, int off)static longdecodeLongBE(byte[] b, int off)static longdecodeLongLE(byte[] b, int off)static shortdecodeShortBE(byte[] b, int off)static shortdecodeShortLE(byte[] b, int off)static longdecodeUIntBE(byte[] b, int off)static longdecodeUIntLE(byte[] b, int off)static intdecodeUShortBE(byte[] b, int off)static intdecodeUShortLE(byte[] b, int off)static voidencodeIntBE(int v, byte[] b, int off)static voidencodeIntLE(int v, byte[] b, int off)static voidencodeLongBE(long v, byte[] b, int off)static voidencodeLongLE(long v, byte[] b, int off)static voidencodeShortBE(int v, byte[] b, int off)static voidencodeShortLE(int v, byte[] b, int off)
-
-
-
Method Detail
-
decodeLongBE
public static long decodeLongBE(byte[] b, int off)
-
decodeUIntBE
public static long decodeUIntBE(byte[] b, int off)
-
decodeUShortBE
public static int decodeUShortBE(byte[] b, int off)
-
decodeIntBE
public static int decodeIntBE(byte[] b, int off)
-
decodeShortBE
public static short decodeShortBE(byte[] b, int off)
-
decodeLongLE
public static long decodeLongLE(byte[] b, int off)
-
decodeUIntLE
public static long decodeUIntLE(byte[] b, int off)
-
decodeUShortLE
public static int decodeUShortLE(byte[] b, int off)
-
decodeIntLE
public static int decodeIntLE(byte[] b, int off)
-
decodeShortLE
public static short decodeShortLE(byte[] b, int off)
-
encodeLongBE
public static void encodeLongBE(long v, byte[] b, int off)
-
encodeIntBE
public static void encodeIntBE(int v, byte[] b, int off)
-
encodeShortBE
public static void encodeShortBE(int v, byte[] b, int off)
-
encodeLongLE
public static void encodeLongLE(long v, byte[] b, int off)
-
encodeIntLE
public static void encodeIntLE(int v, byte[] b, int off)
-
encodeShortLE
public static void encodeShortLE(int v, byte[] b, int off)
-
-