org.mozilla.jss.pkcs7

Class Attribute

Implemented Interfaces:
ASN1Value

public class Attribute
extends java.lang.Object
implements ASN1Value

An Attribute, which has the following ASN.1 definition (roughly):
      Attribute ::= SEQUENCE {
          type        OBJECT IDENTIFIER,
          value       SET }
 

Nested Class Summary

static class
Attribute.Template
A Template for decoding an Attribute.

Field Summary

static Tag
TAG

Constructor Summary

Attribute(OBJECT_IDENTIFIER type, ASN1Value value)
Attribute(OBJECT_IDENTIFIER type, SET values)

Method Summary

void
encode(OutputStream ostream)
void
encode(Tag implicit, OutputStream ostream)
Tag
getTag()
static Attribute.Template
getTemplate()
OBJECT_IDENTIFIER
getType()
SET
getValues()
If this AVA was constructed, returns the SET of ASN1Values passed to the constructor.

Field Details

TAG

public static final Tag TAG

Constructor Details

Attribute

public Attribute(OBJECT_IDENTIFIER type,
                 ASN1Value value)

Attribute

public Attribute(OBJECT_IDENTIFIER type,
                 SET values)

Method Details

encode

public void encode(OutputStream ostream)
            throws IOException
Specified by:
encode in interface ASN1Value

encode

public void encode(Tag implicit,
                   OutputStream ostream)
            throws IOException
Specified by:
encode in interface ASN1Value

getTag

public Tag getTag()
Specified by:
getTag in interface ASN1Value

getTemplate

public static Attribute.Template getTemplate()

getType

public OBJECT_IDENTIFIER getType()

getValues

public SET getValues()
If this AVA was constructed, returns the SET of ASN1Values passed to the constructor. If this Atrribute was decoded with an Attribute.Template, returns a SET of ANYs.