Class RDN

  • All Implemented Interfaces:
    DEREncoder

    public class RDN
    extends Object
    implements DEREncoder
    A set of attribute value assertions.
    • Field Detail

      • HASH_CODE_SEED

        private static final int HASH_CODE_SEED
        hash code seed.
        See Also:
        Constant Field Values
      • RDN_PATH

        private static final DERPath RDN_PATH
        DER path for RDN parsing.
      • attributeValueAssertions

        private final AttributeValueAssertion[] attributeValueAssertions
        Attribute value assertions in this RDN.
    • Method Detail

      • getAttributeValueAssertions

        public AttributeValueAssertion[] getAttributeValueAssertions()
        Returns the attribute value assertions in this RDN.
        Returns:
        attribute value assertions
      • getAttributeValues

        public AttributeValueAssertion.Value[] getAttributeValues​(String oid)
        Returns the attribute values for the supplied oid.
        Parameters:
        oid - to match
        Returns:
        attribute values
      • getAttributeValues

        public <T> T[] getAttributeValues​(String oid,
                                          ValueTranscoder<T> transcoder)
        Returns the attribute values decoded by the supplied transcoder.
        Type Parameters:
        T - type of value
        Parameters:
        oid - to match
        transcoder - to decode the binary value
        Returns:
        decoded attribute values
      • getAttributeValue

        public <T> T getAttributeValue​(String oid,
                                       ValueTranscoder<T> transcoder)
        Returns a single attribute value for the supplied oid. See getAttributeValues(String, ValueTranscoder).
        Type Parameters:
        T - type of value
        Parameters:
        oid - to match
        transcoder - to decode the binary value
        Returns:
        decoded attribute value
      • encode

        public byte[] encode()
        Description copied from interface: DEREncoder
        Encode this object into it's DER type.
        Specified by:
        encode in interface DEREncoder
        Returns:
        DER encoded object
      • decode

        public static RDN[] decode​(DERBuffer encoded)
        Converts bytes in the buffer to RDNs by reading from the current position to the limit.
        Parameters:
        encoded - buffer containing DER-encoded data where the buffer is positioned at the tag of the RDN and the limit is set beyond the last byte of the RDN.
        Returns:
        decoded bytes as RDNs
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object