org.mozilla.jss.pkix.primitive

Class RDN

Implemented Interfaces:
ASN1Value

public class RDN
extends java.lang.Object
implements ASN1Value

A RelativeDistinguishedName, whose ASN.1 is:
 RelativeDistinguishedName ::= SET SIZE(1..MAX) OF AttributeValueAssertion
 

Nested Class Summary

static class
RDN.Template

Field Summary

static Tag
TAG

Constructor Summary

RDN(AVA initialElement)
An RDN must have at least one element at all times, so an initial element must be provided.

Method Summary

void
add(AVA ava)
AVA
at(int idx)
void
encode(OutputStream ostream)
Write this value's DER encoding to an output stream using its own base tag.
void
encode(Tag implicit, OutputStream ostream)
Write this value's DER encoding to an output stream using an implicit tag.
Tag
getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
void
removeAt(int idx)
int
size()

Field Details

TAG

public static final Tag TAG

Constructor Details

RDN

public RDN(AVA initialElement)
An RDN must have at least one element at all times, so an initial element must be provided.

Method Details

add

public void add(AVA ava)

at

public AVA at(int idx)

encode

public void encode(OutputStream ostream)
            throws IOException
Write this value's DER encoding to an output stream using its own base tag.
Specified by:
encode in interface ASN1Value

encode

public void encode(Tag implicit,
                   OutputStream ostream)
            throws IOException
Write this value's DER encoding to an output stream using an implicit tag.
Specified by:
encode in interface ASN1Value

getTag

public Tag getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
Specified by:
getTag in interface ASN1Value

removeAt

public void removeAt(int idx)
            throws TooFewElementsException
Throws:
TooFewElementsException - If removing this element would result in the RDN being empty.

size

public int size()