Deprecated
use org.bouncycastle.util.Arrays.
| Modifier and Type | Field and Description |
|---|---|
| private static final char[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static byte[] | Returns: the clone of the given array, or null if the array is nullthe array to clone array)Return a clone of the given byte array (performs null check beforehand). |
| public static byte[] | Returns: (x2 | | x1) (little-endian order, i.e. x1 is at lower memory addresses)the first array x1, byte[] the second array x2)Concatenate two byte arrays. |
| public static byte[] | Returns: the concatenated input arraya 2-dimensional byte array array)Convert a 2-dimensional byte array into a 1-dimensional byte array by concatenating all entries. |
| public static int | Returns: the hashcodethe array to compute the hashcode of array)Computes a hashcode based on the contents of a one-dimensional byte array rather than its identity. |
| public static int | Returns: the hashcodethe array to compute the hashcode of array)Computes a hashcode based on the contents of a two-dimensional byte array rather than its identity. |
| public static int | Returns: the hashcodethe array to compute the hashcode of array)Computes a hashcode based on the contents of a three-dimensional byte array rather than its identity. |
| public static boolean | Returns: the result of the comparisonthe first byte array left, byte[] the second byte array right)Compare two byte arrays (perform null checks beforehand). |
| public static boolean | Returns: the result of the comparisonthe first byte array left, byte[][] the second byte array right)Compare two two-dimensional byte arrays. |
| public static boolean | Returns: the result of the comparisonthe first byte array left, byte[][][] the second byte array right)Compare two three-dimensional byte arrays. |
| public static byte[] | Returns: a byte array with the corresponding valuea hex string s)Convert a string containing hexadecimal characters to a byte-array. |
| public static byte[][] | Returns: the splitted input array as an array of two byte arraysthe byte array to be split input, int the index where the byte array is split index)Split a byte array input into two arrays at index, i.e. the first array will have the lower index bytes, the second one the higher input.length - index bytes. |
| public static byte[] | Returns: a subarray of input, ranging from start (inclusively) to end (exclusively)the input byte array input, int the start index start, int the end index end)Generate a subarray of a given byte array. |
| public static byte[] | Returns: a subarray of input, ranging from start to the end of the arraythe input byte array input, int the start index start)Generate a subarray of a given byte array. |
| public static String | Returns: the corresponding bit stringthe byte array to be converted input)Convert a byte array to the corresponding bit string. |
| public static char[] | |
| public static String | Returns: the corresponding hexstringthe byte array to be converted input)Convert a byte array to the corresponding hexstring. |
| public static String | Returns: the corresponding hex stringthe byte array to be converted input, String the prefix to put at the beginning of the hex string prefix, String a separator string seperator)Convert a byte array to the corresponding hex string. |
| public static byte[] | Returns: x1 XOR x2the first array x1, byte[] the second array x2)Compute the bitwise XOR of two arrays of bytes. |
| HEX_CHARS | back to summary |
|---|---|
| private static final char[] HEX_CHARS | |
| ByteUtils | back to summary |
|---|---|
| private ByteUtils() Default constructor (private) | |
| clone | back to summary |
|---|---|
| public static byte[] clone(byte[] array) Return a clone of the given byte array (performs null check beforehand).
| |
| concatenate | back to summary |
|---|---|
| public static byte[] concatenate(byte[] x1, byte[] x2) Concatenate two byte arrays. No null checks are performed.
| |
| concatenate | back to summary |
|---|---|
| public static byte[] concatenate(byte[][] array) Convert a 2-dimensional byte array into a 1-dimensional byte array by concatenating all entries.
| |
| deepHashCode | back to summary |
|---|---|
| public static int deepHashCode(byte[] array) Computes a hashcode based on the contents of a one-dimensional byte array rather than its identity.
| |
| deepHashCode | back to summary |
|---|---|
| public static int deepHashCode(byte[][] array) Computes a hashcode based on the contents of a two-dimensional byte array rather than its identity.
| |
| deepHashCode | back to summary |
|---|---|
| public static int deepHashCode(byte[][][] array) Computes a hashcode based on the contents of a three-dimensional byte array rather than its identity.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(byte[] left, byte[] right) Compare two byte arrays (perform null checks beforehand).
| |
| equals | back to summary |
|---|---|
| public static boolean equals(byte[][] left, byte[][] right) Compare two two-dimensional byte arrays. No null checks are performed.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(byte[][][] left, byte[][][] right) Compare two three-dimensional byte arrays. No null checks are performed.
| |
| fromHexString | back to summary |
|---|---|
| public static byte[] fromHexString(String s) Convert a string containing hexadecimal characters to a byte-array.
| |
| split | back to summary |
|---|---|
| public static byte[][] split(byte[] input, int index) throws ArrayIndexOutOfBoundsException Split a byte array input into two arrays at index, i.e. the first array will have the lower index bytes, the second one the higher input.length - index bytes.
| |
| subArray | back to summary |
|---|---|
| public static byte[] subArray(byte[] input, int start, int end) Generate a subarray of a given byte array.
| |
| subArray | back to summary |
|---|---|
| public static byte[] subArray(byte[] input, int start) Generate a subarray of a given byte array.
| |
| toBinaryString | back to summary |
|---|---|
| public static String toBinaryString(byte[] input) Convert a byte array to the corresponding bit string.
| |
| toCharArray | back to summary |
|---|---|
| public static char[] toCharArray(byte[] input) Rewrite a byte array as a char array
| |
| toHexString | back to summary |
|---|---|
| public static String toHexString(byte[] input) Convert a byte array to the corresponding hexstring.
| |
| toHexString | back to summary |
|---|---|
| public static String toHexString(byte[] input, String prefix, String seperator) Convert a byte array to the corresponding hex string. | |
| xor | back to summary |
|---|---|
| public static byte[] xor(byte[] x1, byte[] x2) Compute the bitwise XOR of two arrays of bytes. The arrays have to be of same length. No length checking is performed.
| |