Package org.xbill.DNS.dnssec
Class ByteArrayComparator
java.lang.Object
org.xbill.DNS.dnssec.ByteArrayComparator
This class implements a basic comparator for byte arrays. It is primarily useful for comparing
RDATA portions of DNS records in doing DNSSEC canonical ordering.
- Since:
- 3.5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(byte[] b1, byte[] b2) Compares its two arguments for order.
-
Field Details
-
MAX_BYTE
private static final int MAX_BYTE- See Also:
-
-
Constructor Details
-
ByteArrayComparator
ByteArrayComparator()
-
-
Method Details
-
compare
public int compare(byte[] b1, byte[] b2) Compares its two arguments for order.- Parameters:
b1- the first object to be compared.b2- the second object to be compared.- Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
-