Package org.webpki.util
Class ArrayUtil
java.lang.Object
org.webpki.util.ArrayUtil
Collection of support functions for arrays.
To be deprecated in favor of Arrays.
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]add(byte[] a, byte[] b) static byte[]copy(byte[] b) static byte[]copy(byte[] b, int newSize) static intfirstDiff(byte[] a, byte[] b) static intfirstDiff(byte[] a, byte[] b, int offset, int length) static intfirstDiff(byte[] a, int aOffset, byte[] b, int bOffset, int length) static intindexOfMax(int[] a) static intindexOfMin(int[] a) static intmax(int[] a) static intmin(int[] a) static byte[]reverse(byte[] b) static StringtoHexString(byte[] value) static StringtoHexString(byte[] value, int startOffset, int maxLength) static StringtoHexString(byte[] value, int startOffset, int maxLength, boolean uppercase, char separator) static StringtoHexString(int value, char byteSeparator)
-
Method Details
-
firstDiff
public static int firstDiff(byte[] a, int aOffset, byte[] b, int bOffset, int length) -
firstDiff
public static int firstDiff(byte[] a, byte[] b, int offset, int length) -
firstDiff
public static int firstDiff(byte[] a, byte[] b) -
indexOfMin
public static int indexOfMin(int[] a) -
indexOfMax
public static int indexOfMax(int[] a) -
min
public static int min(int[] a) -
max
public static int max(int[] a) -
toHexString
public static String toHexString(byte[] value, int startOffset, int maxLength, boolean uppercase, char separator) -
toHexString
-
toHexString
-
toHexString
-
copy
public static byte[] copy(byte[] b, int newSize) -
copy
public static byte[] copy(byte[] b) -
add
public static byte[] add(byte[] a, byte[] b) -
reverse
public static byte[] reverse(byte[] b)
-