(byte[] array1, byte[] array2)
| 1553 | /// same length and the elements at each index in the two arrays are |
| 1554 | /// equal, `false` otherwise. |
| 1555 | public static boolean equals(byte[] array1, byte[] array2) { |
| 1556 | if (array1 == array2) { |
| 1557 | return true; |
| 1558 | } |
| 1559 | if (array1 == null || array2 == null || array1.length != array2.length) { |
| 1560 | return false; |
| 1561 | } |
| 1562 | for (int i = 0; i < array1.length; i++) { |
| 1563 | if (array1[i] != array2[i]) { |
| 1564 | return false; |
| 1565 | } |
| 1566 | } |
| 1567 | return true; |
| 1568 | } |
| 1569 | |
| 1570 | /// Compares the two arrays. |
| 1571 | /// |
no test coverage detected