public final class Arrays
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Arrays.Iterator<T>
Iterator backed by a specific array.
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
append(byte[] a,
byte b) |
static int[] |
append(int[] a,
int b) |
static short[] |
append(short[] a,
short b) |
static java.lang.String[] |
append(java.lang.String[] a,
java.lang.String b) |
static boolean |
areAllZeroes(byte[] buf,
int off,
int len) |
static boolean |
areEqual(boolean[] a,
boolean[] b) |
static boolean |
areEqual(byte[] a,
byte[] b) |
static boolean |
areEqual(byte[] a,
int aFromIndex,
int aToIndex,
byte[] b,
int bFromIndex,
int bToIndex) |
static boolean |
areEqual(char[] a,
char[] b) |
static boolean |
areEqual(int[] a,
int[] b) |
static boolean |
areEqual(long[] a,
long[] b) |
static boolean |
areEqual(java.lang.Object[] a,
java.lang.Object[] b) |
static boolean |
areEqual(short[] a,
short[] b) |
static void |
clear(byte[] data)
Fill input array by zeros
|
static void |
clear(int[] data) |
static java.math.BigInteger[] |
clone(java.math.BigInteger[] data) |
static boolean[] |
clone(boolean[] data) |
static byte[] |
clone(byte[] data) |
static byte[][] |
clone(byte[][] data) |
static byte[][][] |
clone(byte[][][] data) |
static byte[] |
clone(byte[] data,
byte[] existing) |
static char[] |
clone(char[] data) |
static int[] |
clone(int[] data) |
static long[] |
clone(long[] data) |
static long[] |
clone(long[] data,
long[] existing) |
static short[] |
clone(short[] data) |
static int |
compareUnsigned(byte[] a,
byte[] b) |
static byte[] |
concatenate(byte[][] arrays) |
static byte[] |
concatenate(byte[] a,
byte[] b) |
static byte[] |
concatenate(byte[] a,
byte[] b,
byte[] c) |
static byte[] |
concatenate(byte[] a,
byte[] b,
byte[] c,
byte[] d) |
static int[] |
concatenate(int[] a,
int[] b) |
static short[] |
concatenate(short[] a,
short[] b) |
static boolean |
constantTimeAreEqual(byte[] expected,
byte[] supplied)
A constant time equals comparison - does not terminate early if
test will fail.
|
static boolean |
constantTimeAreEqual(char[] expected,
char[] supplied)
A constant time equals comparison - does not terminate early if
comparison fails.
|
static boolean |
constantTimeAreEqual(int len,
byte[] a,
int aOff,
byte[] b,
int bOff) |
static boolean |
contains(boolean[] a,
boolean val) |
static boolean |
contains(byte[] a,
byte val) |
static boolean |
contains(char[] a,
char val) |
static boolean |
contains(int[] a,
int val) |
static boolean |
contains(long[] a,
long val) |
static boolean |
contains(short[] a,
short val) |
static java.math.BigInteger[] |
copyOf(java.math.BigInteger[] original,
int newLength) |
static boolean[] |
copyOf(boolean[] original,
int newLength) |
static byte[] |
copyOf(byte[] original,
int newLength) |
static char[] |
copyOf(char[] original,
int newLength) |
static int[] |
copyOf(int[] original,
int newLength) |
static long[] |
copyOf(long[] original,
int newLength) |
static short[] |
copyOf(short[] original,
int newLength) |
static java.math.BigInteger[] |
copyOfRange(java.math.BigInteger[] original,
int from,
int to) |
static boolean[] |
copyOfRange(boolean[] original,
int from,
int to) |
static byte[] |
copyOfRange(byte[] original,
int from,
int to)
Make a copy of a range of bytes from the passed in array.
|
static char[] |
copyOfRange(char[] original,
int from,
int to) |
static int[] |
copyOfRange(int[] original,
int from,
int to) |
static long[] |
copyOfRange(long[] original,
int from,
int to) |
static short[] |
copyOfRange(short[] original,
int from,
int to) |
static void |
fill(boolean[] a,
boolean val) |
static void |
fill(boolean[] a,
int fromIndex,
int toIndex,
boolean val) |
static void |
fill(byte[] a,
byte val) |
static void |
fill(byte[] a,
int fromIndex,
int toIndex,
byte val) |
static void |
fill(char[] a,
char val) |
static void |
fill(char[] a,
int fromIndex,
int toIndex,
char val) |
static void |
fill(int[] a,
int val) |
static void |
fill(int[] a,
int fromIndex,
int toIndex,
int val) |
static void |
fill(long[] a,
int fromIndex,
int toIndex,
long val) |
static void |
fill(long[] a,
long val) |
static void |
fill(java.lang.Object[] a,
int fromIndex,
int toIndex,
java.lang.Object val) |
static void |
fill(java.lang.Object[] a,
java.lang.Object val) |
static void |
fill(short[] a,
int fromIndex,
int toIndex,
short val) |
static void |
fill(short[] a,
short val) |
static int |
hashCode(byte[] data) |
static int |
hashCode(byte[] data,
int off,
int len) |
static int |
hashCode(char[] data) |
static int |
hashCode(int[] data) |
static int |
hashCode(int[][] ints) |
static int |
hashCode(int[] data,
int off,
int len) |
static int |
hashCode(long[] data) |
static int |
hashCode(long[] data,
int off,
int len) |
static int |
hashCode(java.lang.Object[] data) |
static int |
hashCode(short[] data) |
static int |
hashCode(short[][] shorts) |
static int |
hashCode(short[][][] shorts) |
static boolean |
isNullOrContainsNull(java.lang.Object[] array) |
static boolean |
isNullOrEmpty(byte[] array) |
static boolean |
isNullOrEmpty(int[] array) |
static boolean |
isNullOrEmpty(java.lang.Object[] array) |
static byte[] |
prepend(byte[] a,
byte b) |
static int[] |
prepend(int[] a,
int b) |
static short[] |
prepend(short[] a,
short b) |
static byte[] |
reverse(byte[] a) |
static void |
reverse(byte[] input,
byte[] output) |
static int[] |
reverse(int[] a) |
static byte[] |
reverseInPlace(byte[] a) |
static void |
reverseInPlace(byte[] a,
int aOff,
int aLen) |
static int[] |
reverseInPlace(int[] a) |
static short[] |
reverseInPlace(short[] a) |
public static boolean areAllZeroes(byte[] buf, int off, int len)
public static boolean areEqual(boolean[] a, boolean[] b)
public static boolean areEqual(byte[] a, byte[] b)
public static boolean areEqual(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)
public static boolean areEqual(char[] a, char[] b)
public static boolean areEqual(int[] a, int[] b)
public static boolean areEqual(long[] a, long[] b)
public static boolean areEqual(java.lang.Object[] a, java.lang.Object[] b)
public static boolean areEqual(short[] a, short[] b)
public static boolean constantTimeAreEqual(byte[] expected, byte[] supplied)
expected
- first arraysupplied
- second arraypublic static boolean constantTimeAreEqual(int len, byte[] a, int aOff, byte[] b, int bOff)
public static boolean constantTimeAreEqual(char[] expected, char[] supplied)
expected
- first arraysupplied
- second arraypublic static int compareUnsigned(byte[] a, byte[] b)
public static boolean contains(boolean[] a, boolean val)
public static boolean contains(byte[] a, byte val)
public static boolean contains(char[] a, char val)
public static boolean contains(int[] a, int val)
public static boolean contains(long[] a, long val)
public static boolean contains(short[] a, short val)
public static void fill(boolean[] a, boolean val)
public static void fill(boolean[] a, int fromIndex, int toIndex, boolean val)
public static void fill(byte[] a, byte val)
public static void fill(byte[] a, int fromIndex, int toIndex, byte val)
public static void fill(char[] a, char val)
public static void fill(char[] a, int fromIndex, int toIndex, char val)
public static void fill(int[] a, int val)
public static void fill(int[] a, int fromIndex, int toIndex, int val)
public static void fill(long[] a, long val)
public static void fill(long[] a, int fromIndex, int toIndex, long val)
public static void fill(java.lang.Object[] a, java.lang.Object val)
public static void fill(java.lang.Object[] a, int fromIndex, int toIndex, java.lang.Object val)
public static void fill(short[] a, short val)
public static void fill(short[] a, int fromIndex, int toIndex, short val)
public static int hashCode(byte[] data)
public static int hashCode(byte[] data, int off, int len)
public static int hashCode(char[] data)
public static int hashCode(int[][] ints)
public static int hashCode(int[] data)
public static int hashCode(int[] data, int off, int len)
public static int hashCode(long[] data)
public static int hashCode(long[] data, int off, int len)
public static int hashCode(short[][][] shorts)
public static int hashCode(short[][] shorts)
public static int hashCode(short[] data)
public static int hashCode(java.lang.Object[] data)
public static boolean[] clone(boolean[] data)
public static byte[] clone(byte[] data)
public static char[] clone(char[] data)
public static int[] clone(int[] data)
public static long[] clone(long[] data)
public static short[] clone(short[] data)
public static java.math.BigInteger[] clone(java.math.BigInteger[] data)
public static byte[] clone(byte[] data, byte[] existing)
public static long[] clone(long[] data, long[] existing)
public static byte[][] clone(byte[][] data)
public static byte[][][] clone(byte[][][] data)
public static boolean[] copyOf(boolean[] original, int newLength)
public static byte[] copyOf(byte[] original, int newLength)
public static char[] copyOf(char[] original, int newLength)
public static int[] copyOf(int[] original, int newLength)
public static long[] copyOf(long[] original, int newLength)
public static short[] copyOf(short[] original, int newLength)
public static java.math.BigInteger[] copyOf(java.math.BigInteger[] original, int newLength)
public static boolean[] copyOfRange(boolean[] original, int from, int to)
public static byte[] copyOfRange(byte[] original, int from, int to)
original
- the array from which the data is to be copied.from
- the start index at which the copying should take place.to
- the final index of the range (exclusive).public static char[] copyOfRange(char[] original, int from, int to)
public static int[] copyOfRange(int[] original, int from, int to)
public static long[] copyOfRange(long[] original, int from, int to)
public static short[] copyOfRange(short[] original, int from, int to)
public static java.math.BigInteger[] copyOfRange(java.math.BigInteger[] original, int from, int to)
public static byte[] append(byte[] a, byte b)
public static short[] append(short[] a, short b)
public static int[] append(int[] a, int b)
public static java.lang.String[] append(java.lang.String[] a, java.lang.String b)
public static byte[] concatenate(byte[] a, byte[] b)
public static short[] concatenate(short[] a, short[] b)
public static byte[] concatenate(byte[] a, byte[] b, byte[] c)
public static byte[] concatenate(byte[] a, byte[] b, byte[] c, byte[] d)
public static byte[] concatenate(byte[][] arrays)
public static int[] concatenate(int[] a, int[] b)
public static byte[] prepend(byte[] a, byte b)
public static short[] prepend(short[] a, short b)
public static int[] prepend(int[] a, int b)
public static byte[] reverse(byte[] a)
public static int[] reverse(int[] a)
public static void reverse(byte[] input, byte[] output)
public static byte[] reverseInPlace(byte[] a)
public static void reverseInPlace(byte[] a, int aOff, int aLen)
public static short[] reverseInPlace(short[] a)
public static int[] reverseInPlace(int[] a)
public static void clear(byte[] data)
data
- input arraypublic static void clear(int[] data)
public static boolean isNullOrContainsNull(java.lang.Object[] array)
public static boolean isNullOrEmpty(byte[] array)
public static boolean isNullOrEmpty(int[] array)
public static boolean isNullOrEmpty(java.lang.Object[] array)