org.mozilla.jss.asn1

Interface ASN1Template

public interface ASN1Template

An interface for decoding ASN1Values from their BER encodings.

See Also: ASN1Value

Method Summary
ASN1Valuedecode(InputStream istream)
Decodes an ASN1Value from the InputStream without an implicit tag.
ASN1Valuedecode(Tag implicitTag, InputStream istream)
Decodes an ASN1Value from the InputStream with the given implicit tag.
booleantagMatch(Tag tag)
Determines whether the given tag will satisfy this template.

Method Detail

decode

public ASN1Value decode(InputStream istream)
Decodes an ASN1Value from the InputStream without an implicit tag.

Parameters: istream Must support marking (markSupported() == true). For example, ByteArrayInputStream and BufferedInputStream support marking, but FileInputStream does not. If your source does not support marking, you can wrap it in a BufferedInputStream.

decode

public ASN1Value decode(Tag implicitTag, InputStream istream)
Decodes an ASN1Value from the InputStream with the given implicit tag.

Parameters: istream Must support marking (markSupported() == true). For example, ByteArrayInputStream and BufferedInputStream support marking, but FileInputStream does not. If your source does not support marking, you can wrap it in a BufferedInputStream.

tagMatch

public boolean tagMatch(Tag tag)
Determines whether the given tag will satisfy this template.