| java.lang.Object com.anthonyeden.lib.util.ByteUtilities
ByteUtilities | public class ByteUtilities (Code) | | Utility class for working with bytes and byte arrays.
author: Anthony Eden |
Method Summary | |
public static int | byteArrayToInt(byte[] b) Convert the byte array to an int. | public static int | byteArrayToInt(byte[] b, int offset) Convert the byte array to an int starting from the given offset. | public static byte[] | intToByteArray(int value) Convert the specified int to a 4 byte array. |
byteArrayToInt | public static int byteArrayToInt(byte[] b)(Code) | | Convert the byte array to an int.
Parameters: b - The byte array The integer |
byteArrayToInt | public static int byteArrayToInt(byte[] b, int offset)(Code) | | Convert the byte array to an int starting from the given offset.
Parameters: b - The byte array Parameters: offset - The array offset The integer |
intToByteArray | public static byte[] intToByteArray(int value)(Code) | | Convert the specified int to a 4 byte array.
Parameters: value - The value The byte array |
|
|