Searched defs:bytes2 (Results 1 - 4 of 4) sorted by relevance

/libcore/ojluni/src/main/java/sun/security/util/
H A DByteArrayLexOrder.java46 * @param bytes2 second byte array to compare.
47 * @return negative number if bytes1 < bytes2, 0 if bytes1 == bytes2,
48 * positive number if bytes1 > bytes2.
53 public final int compare( byte[] bytes1, byte[] bytes2) { argument
55 for (int i = 0; i < bytes1.length && i < bytes2.length; i++) {
56 diff = (bytes1[i] & 0xFF) - (bytes2[i] & 0xFF);
63 return bytes1.length - bytes2.length;
H A DByteArrayTagOrder.java46 * @param bytes2 second byte array to compare.
47 * @return negative number if bytes1 < bytes2, 0 if bytes1 == bytes2,
48 * positive number if bytes1 > bytes2.
54 public final int compare(byte[] bytes1, byte[] bytes2) { argument
57 return (bytes1[0] | 0x20) - (bytes2[0] | 0x20);
/libcore/luni/src/test/java/libcore/java/text/
H A DOldCollationKeyTest.java51 byte[] bytes2 = collator.getCollationKey("123").toByteArray();
57 compareUnsignedByteArrays(bytes1, bytes2) < 0);
60 compareUnsignedByteArrays(bytes2, bytes3) < 0);
70 private int compareUnsignedByteArrays(byte[] bytes1, byte[] bytes2) { argument
71 int commonLength = Math.min(bytes1.length, bytes2.length);
75 int keyB = bytes2[i] & 0xFF;
84 if (bytes1.length < bytes2.length) {
86 } else if (bytes1.length > bytes2.length) {
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DStringTest.java694 boolean bytesEquals(byte[] bytes1, byte[] bytes2) { argument
695 return Arrays.toString(bytes1).equals(Arrays.toString(bytes2));

Completed in 185 milliseconds