|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.jss.pkix.cms.ContentInfo
public class ContentInfo
A PKCS #7 ContentInfo structure.
Nested Class Summary | |
---|---|
static class |
ContentInfo.Template
A template for decoding a ContentInfo blob |
Field Summary | |
---|---|
static OBJECT_IDENTIFIER |
DATA
|
static OBJECT_IDENTIFIER |
DIGESTED_DATA
|
static OBJECT_IDENTIFIER |
ENCRYPTED_DATA
|
static OBJECT_IDENTIFIER |
ENVELOPED_DATA
|
static OBJECT_IDENTIFIER |
SIGNED_AND_ENVELOPED_DATA
|
static OBJECT_IDENTIFIER |
SIGNED_DATA
|
static Tag |
TAG
|
Constructor Summary | |
---|---|
ContentInfo(byte[] data)
Creates a ContentInfo of type data . |
|
ContentInfo(DigestedData dd)
Creates a ContentInfo of type digestedData . |
|
ContentInfo(EncryptedData ed)
Creates a ContentInfo of type encryptedData . |
|
ContentInfo(EnvelopedData ed)
Creates a ContentInfo of type envelopedData . |
|
ContentInfo(OBJECT_IDENTIFIER contentType,
ASN1Value content)
Creates a ContentInfo with the given type and content. |
|
ContentInfo(SignedAndEnvelopedData sed)
Creates a ContentInfo of type signedAndEnvelopedData . |
|
ContentInfo(SignedData sd)
Creates a ContentInfo of type signedData . |
Method Summary | |
---|---|
void |
encode(java.io.OutputStream ostream)
Write this value's DER encoding to an output stream using its own base tag. |
void |
encode(Tag implicitTag,
java.io.OutputStream ostream)
Write this value's DER encoding to an output stream using an implicit tag. |
ANY |
getContent()
Returns the content encoded as an ANY. |
OBJECT_IDENTIFIER |
getContentType()
Returns the contentType field, which determines what kind of content is contained in this ContentInfo. |
ASN1Value |
getInterpretedContent()
Returns the content, interpreted based on its type. |
Tag |
getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context. |
static ContentInfo.Template |
getTemplate()
Returns a singleton instance of a decoding template for ContentInfo. |
boolean |
hasContent()
Returns true if the content field is present. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Tag TAG
public static OBJECT_IDENTIFIER DATA
public static OBJECT_IDENTIFIER SIGNED_DATA
public static OBJECT_IDENTIFIER ENVELOPED_DATA
public static OBJECT_IDENTIFIER SIGNED_AND_ENVELOPED_DATA
public static OBJECT_IDENTIFIER DIGESTED_DATA
public static OBJECT_IDENTIFIER ENCRYPTED_DATA
Constructor Detail |
---|
public ContentInfo(OBJECT_IDENTIFIER contentType, ASN1Value content)
contentType
- The contentType of the ContentInfo.content
- The content of the ContentInfo. May be null
to signify that the optional content field is not present.public ContentInfo(byte[] data)
data
.
public ContentInfo(SignedData sd)
signedData
.
public ContentInfo(EnvelopedData ed)
envelopedData
.
public ContentInfo(SignedAndEnvelopedData sed)
signedAndEnvelopedData
.
public ContentInfo(DigestedData dd)
digestedData
.
public ContentInfo(EncryptedData ed)
encryptedData
.
Method Detail |
---|
public OBJECT_IDENTIFIER getContentType()
public boolean hasContent()
true
if the content field is present.
public ASN1Value getInterpretedContent() throws InvalidBERException
null
is returned.
If the contentType is one of the six standard types, the returned object will be of that type. For example, if the ContentInfo has contentType signedData, a SignedData object will be returned. If the contentType is data, an OCTET_STRING will be returned.
If the contentType is not one of the six standard types, the returned object will be an ANY.
InvalidBERException
public ANY getContent()
null
is returned.
public void encode(java.io.OutputStream ostream) throws java.io.IOException
ASN1Value
encode
in interface ASN1Value
java.io.IOException
public void encode(Tag implicitTag, java.io.OutputStream ostream) throws java.io.IOException
ASN1Value
encode
in interface ASN1Value
java.io.IOException
public Tag getTag()
ASN1Value
getTag
in interface ASN1Value
public static ContentInfo.Template getTemplate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |