Class ByteArrayTagOrder
java.lang.Object
org.mozilla.jss.netscape.security.util.ByteArrayTagOrder
- All Implemented Interfaces:
Serializable,Comparator<byte[]>
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intcompare(byte[] bytes1, byte[] bytes2) Compare two byte arrays, by the order of their tags, as defined in ITU-T X.680, sec.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
ByteArrayTagOrder
public ByteArrayTagOrder()
-
-
Method Details
-
compare
public final int compare(byte[] bytes1, byte[] bytes2) Compare two byte arrays, by the order of their tags, as defined in ITU-T X.680, sec. 6.4. (First compare tag classes, then tag numbers, ignoring the constructivity bit.)- Specified by:
comparein interfaceComparator<byte[]>- Parameters:
bytes1- first byte array to compare.bytes2- second byte array to compare.- Returns:
- negative number if bytes1 < bytes2, 0 if bytes1 == bytes2, positive number if bytes1 > bytes2.
-