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(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[] array)
Fill input array by zeros
|
static java.math.BigInteger[] |
clone(java.math.BigInteger[] 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 boolean |
constantTimeAreEqual(byte[] expected,
byte[] supplied)
A constant time equals comparison - does not terminate early if
test will fail.
|
static boolean |
contains(int[] a,
int n) |
static boolean |
contains(short[] a,
short n) |
static java.math.BigInteger[] |
copyOf(java.math.BigInteger[] data,
int newLength) |
static byte[] |
copyOf(byte[] data,
int newLength) |
static char[] |
copyOf(char[] data,
int newLength) |
static int[] |
copyOf(int[] data,
int newLength) |
static long[] |
copyOf(long[] data,
int newLength) |
static java.math.BigInteger[] |
copyOfRange(java.math.BigInteger[] data,
int from,
int to) |
static byte[] |
copyOfRange(byte[] data,
int from,
int to)
Make a copy of a range of bytes from the passed in data array.
|
static int[] |
copyOfRange(int[] data,
int from,
int to) |
static long[] |
copyOfRange(long[] data,
int from,
int to) |
static void |
fill(byte[] array,
byte value) |
static void |
fill(byte[] array,
int out,
byte value) |
static void |
fill(byte[] array,
int start,
int finish,
byte value) |
static void |
fill(char[] array,
char value) |
static void |
fill(int[] array,
int value) |
static void |
fill(int[] array,
int out,
int value) |
static void |
fill(long[] array,
int out,
long value) |
static void |
fill(long[] array,
long value) |
static void |
fill(short[] array,
int out,
short value) |
static void |
fill(short[] array,
short value) |
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 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 int[] |
reverse(int[] a) |
public static boolean areAllZeroes(byte[] buf, int off, int len)
public static boolean areEqual(boolean[] a, boolean[] b)
public static boolean areEqual(char[] a, char[] b)
public static boolean areEqual(byte[] a, byte[] b)
public static boolean areEqual(short[] a, short[] b)
public static boolean constantTimeAreEqual(byte[] expected, byte[] supplied)
expected
- first arraysupplied
- second arraypublic 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 int compareUnsigned(byte[] a, byte[] b)
public static boolean contains(short[] a, short n)
public static boolean contains(int[] a, int n)
public static void fill(byte[] array, byte value)
public static void fill(byte[] array, int start, int finish, byte value)
public static void fill(char[] array, char value)
public static void fill(long[] array, long value)
public static void fill(short[] array, short value)
public static void fill(int[] array, int value)
public static void fill(byte[] array, int out, byte value)
public static void fill(int[] array, int out, int value)
public static void fill(short[] array, int out, short value)
public static void fill(long[] array, int out, long value)
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 byte[] clone(byte[] data)
public static char[] clone(char[] data)
public static byte[] clone(byte[] data, byte[] existing)
public static byte[][] clone(byte[][] data)
public static byte[][][] clone(byte[][][] data)
public static int[] clone(int[] data)
public static long[] clone(long[] data)
public static long[] clone(long[] data, long[] existing)
public static short[] clone(short[] data)
public static java.math.BigInteger[] clone(java.math.BigInteger[] data)
public static byte[] copyOf(byte[] data, int newLength)
public static char[] copyOf(char[] data, int newLength)
public static int[] copyOf(int[] data, int newLength)
public static long[] copyOf(long[] data, int newLength)
public static java.math.BigInteger[] copyOf(java.math.BigInteger[] data, int newLength)
public static byte[] copyOfRange(byte[] data, int from, int to)
data
- 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 int[] copyOfRange(int[] data, int from, int to)
public static long[] copyOfRange(long[] data, int from, int to)
public static java.math.BigInteger[] copyOfRange(java.math.BigInteger[] data, 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 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 clear(byte[] array)
array
- input array