Package tools
Class BytesArrayTools
- java.lang.Object
-
- tools.BytesArrayTools
-
public class BytesArrayTools extends java.lang.ObjectHelper to manipulate byte[].- Version:
- 1.0
- Author:
- Louis Royer, Flavien Haas, JS Auge
-
-
Constructor Summary
Constructors Constructor Description BytesArrayTools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intreadInt(byte[] array, int start)Read int from a bytearraystatic longreadLong(byte[] array, int start)Read long from a bytearraystatic voidwrite(byte[] array, int start, int value)Write int in a bytearraystatic voidwrite(byte[] array, int start, long value)Write long in a bytearray
-
-
-
Method Detail
-
write
public static void write(byte[] array, int start, int value)Write int in a bytearray- Parameters:
array- the array to writestart- where to begin writtingvalue- int to write
-
write
public static void write(byte[] array, int start, long value)Write long in a bytearray- Parameters:
array- the array to writestart- where to begin writtingvalue- long to write
-
readInt
public static int readInt(byte[] array, int start) throws SizeErrorRead int from a bytearray- Parameters:
array- the array to readstart- where to begin reading- Returns:
- value read as int
- Throws:
SizeError
-
-