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 int
firstDiff
(byte[] a, byte[] b) static int
firstDiff
(byte[] a, byte[] b, int offset, int length) static int
firstDiff
(byte[] a, int aOffset, byte[] b, int bOffset, int length) static int
indexOfMax
(int[] a) static int
indexOfMin
(int[] a) static int
max
(int[] a) static int
min
(int[] a) static byte[]
reverse
(byte[] b) static String
toHexString
(byte[] value) static String
toHexString
(byte[] value, int startOffset, int maxLength) static String
toHexString
(byte[] value, int startOffset, int maxLength, boolean uppercase, char separator) static String
toHexString
(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)
-