org.mozilla.jss.asn1

Class EXPLICIT.Template

Enclosing Class:
EXPLICIT
Implemented Interfaces:
ASN1Template

public static class EXPLICIT.Template
extends java.lang.Object
implements ASN1Template

A template for decoding an object wrapped in an EXPLICIT tag.

Constructor Summary

Template(Tag tag, ASN1Template content)
Creates a template for unwrapping an object wrapped in an explicit tag.

Method Summary

ASN1Value
decode(InputStream istream)
ASN1Value
decode(Tag implicitTag, InputStream istream)
boolean
tagMatch(Tag tag)

Constructor Details

Template

public Template(Tag tag,
                ASN1Template content)
Creates a template for unwrapping an object wrapped in an explicit tag. For example, to decode:
 MyValue ::= [3] EXPLICIT INTEGER
 
use:
 EXPLICIT.Template myTemplate = new EXPLICIT.Template( new Tag(3),
      new INTEGER.Template() );
 
Parameters:
tag - The tag value of the EXPLICIT tag.
content - The template for decoding the object that is wrapped in the explicit tag.

Method Details

decode

public ASN1Value decode(InputStream istream)
            throws IOException,
                   InvalidBERException
Specified by:
decode in interface ASN1Template

decode

public ASN1Value decode(Tag implicitTag,
                        InputStream istream)
            throws IOException,
                   InvalidBERException
Specified by:
decode in interface ASN1Template

tagMatch

public boolean tagMatch(Tag tag)
Specified by:
tagMatch in interface ASN1Template