Package tools
Class BytesArrayTools
- java.lang.Object
-
- tools.BytesArrayTools
-
public class BytesArrayTools extends java.lang.Object
Helper 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 int
readInt(byte[] array, int start)
Read int from a bytearraystatic long
readLong(byte[] array, int start)
Read long from a bytearraystatic void
write(byte[] array, int start, int value)
Write int in a bytearraystatic void
write(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 SizeError
Read int from a bytearray- Parameters:
array
- the array to readstart
- where to begin reading- Returns:
- value read as int
- Throws:
SizeError
-
-