org.mozilla.jss.pkix.cms

Class EncapsulatedContentInfo

public class EncapsulatedContentInfo extends Object implements ASN1Value

A CMS EncapsulatedContentInfo structure.
Nested Class Summary
static classEncapsulatedContentInfo.Template
A template for decoding a EncapsulatedContentInfo blob
Field Summary
static TagTAG
Constructor Summary
EncapsulatedContentInfo(OBJECT_IDENTIFIER contentType, ASN1Value content)
Creates a EncapsulatedContentInfo with the given type and content.
Method Summary
voidencode(OutputStream ostream)
voidencode(Tag implicitTag, OutputStream ostream)
OCTET_STRINGgetContent()
Returns the content encoded as an OCTET_STRING.
OBJECT_IDENTIFIERgetContentType()
Returns the contentType field, which determines what kind of content is contained in this EncapsulatedContentInfo.
TaggetTag()
static EncapsulatedContentInfo.TemplategetTemplate()
Returns a singleton instance of a decoding template for EncapsulatedContentInfo.
booleanhasContent()
Returns true if the content field is present.

Field Detail

TAG

public static final Tag TAG

Constructor Detail

EncapsulatedContentInfo

public EncapsulatedContentInfo(OBJECT_IDENTIFIER contentType, ASN1Value content)
Creates a EncapsulatedContentInfo with the given type and content.

Parameters: contentType The contentType of the EncapsulatedContentInfo. content The content of the EncapsulatedContentInfo. May be null to signify that the optional content field is not present.

Method Detail

encode

public void encode(OutputStream ostream)

encode

public void encode(Tag implicitTag, OutputStream ostream)

getContent

public OCTET_STRING getContent()
Returns the content encoded as an OCTET_STRING. If there is no content, null is returned.

getContentType

public OBJECT_IDENTIFIER getContentType()
Returns the contentType field, which determines what kind of content is contained in this EncapsulatedContentInfo.

getTag

public Tag getTag()

getTemplate

public static EncapsulatedContentInfo.Template getTemplate()
Returns a singleton instance of a decoding template for EncapsulatedContentInfo.

hasContent

public boolean hasContent()
Returns true if the content field is present.