Package uk.gov.gchq.gaffer.commonutil
Class ByteUtil
- java.lang.Object
-
- uk.gov.gchq.gaffer.commonutil.ByteUtil
-
public final class ByteUtil extends Object
Utility methods for bytes
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
areSortedBytesEqual(byte[] bytes1, byte[] bytes2)
Copy of the isEqual method in org.apache.accumulo.core.data.Key.static int
compareSortedBytes(byte[] bytes1, byte[] bytes2)
Compares two sorted byte arrays.
-
-
-
Method Detail
-
compareSortedBytes
public static int compareSortedBytes(byte[] bytes1, byte[] bytes2)
Compares two sorted byte arrays.- Parameters:
bytes1
- the first byte arraybytes2
- the second byte array- Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
-
areSortedBytesEqual
public static boolean areSortedBytesEqual(byte[] bytes1, byte[] bytes2)
Copy of the isEqual method in org.apache.accumulo.core.data.Key.- Parameters:
bytes1
- first array of bytes to testbytes2
- second array of bytes to test- Returns:
- true if the provided bytes are equal
-
-