org.webdocwf.util.smime.cms
Class ContentInfo

java.lang.Object
  |
  +--org.webdocwf.util.smime.der.DERObject
        |
        +--org.webdocwf.util.smime.der.DERSequencePr
              |
              +--org.webdocwf.util.smime.cms.ContentInfo

public class ContentInfo
extends DERSequencePr

ContentInfo class is DER encoded content info represented in ASN.1 notation according to RFC2630. This class is top level class in construction of CMS objects (signed or encrypted)

ContentInfo ::= SEQUENCE {
contentType ContentType,
content [0] EXPLICIT ANY DEFINED BY contentType }

ContentType ::= OBJECT IDENTIFIER

content [0]


Constructor Summary
ContentInfo()
          Constructs empty Content Info.
 
Method Summary
 void addContent(byte[] cont0)
          Adds content to Content Info
 void addContentType(byte[] type0)
          Adds Content Type to Content Info
 
Methods inherited from class org.webdocwf.util.smime.der.DERObject
getContentOctets, getContentPartSize, getDEREncoded, getIdentifierOctet, getLengthOctets, getLengthPartSize, getTagClassType, getTagComplexity, getTagTypeNumber, getTotalSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentInfo

public ContentInfo()
            throws SMIMEException
Constructs empty Content Info. Both methods addContentType and addContent must be performed after construction, for obtaining valid CMS object.
Throws:
SMIMEException - thrown from super class.
Method Detail

addContentType

public void addContentType(byte[] type0)
                    throws SMIMEException
Adds Content Type to Content Info
Parameters:
type0 - Content Type represented as byte array
Throws:
SMIMEException - if order of adding components is wrong. Also, it can be thrown from super class addContent method.

addContent

public void addContent(byte[] cont0)
                throws SMIMEException
Adds content to Content Info
Overrides:
addContent in class DERSequencePr
Parameters:
cont0 - Content represented as byte array
Throws:
SMIMEException - if order of adding components is wrong. Also, it can be thrown from super class addContent method.


Copyright © 2002-2002 Together Teamlösungen. All Rights Reserved.