Package org.bouncycastle.asn1.cms
Class ContentInfo
- java.lang.Object
-
- org.bouncycastle.asn1.ASN1Object
-
- org.bouncycastle.asn1.cms.ContentInfo
-
- All Implemented Interfaces:
ASN1Encodable,Encodable
public class ContentInfo extends ASN1Object
-
-
Constructor Summary
Constructors Constructor Description ContentInfo(ASN1ObjectIdentifier contentType, ASN1Encodable content)ContentInfo(ASN1Sequence seq)Deprecated.use getInstance()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ASN1EncodablegetContent()ASN1ObjectIdentifiergetContentType()static ContentInfogetInstance(Object obj)Return an ContentInfo object from the given object.static ContentInfogetInstance(ASN1TaggedObject obj, boolean explicit)ASN1PrimitivetoASN1Primitive()Produce an object suitable for an ASN1OutputStream.-
Methods inherited from class org.bouncycastle.asn1.ASN1Object
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
-
-
-
-
Constructor Detail
-
ContentInfo
public ContentInfo(ASN1Sequence seq)
Deprecated.use getInstance()
-
ContentInfo
public ContentInfo(ASN1ObjectIdentifier contentType, ASN1Encodable content)
-
-
Method Detail
-
getInstance
public static ContentInfo getInstance(Object obj)
Return an ContentInfo object from the given object.Accepted inputs:
- null → null
-
ContentInfoobject -
ASN1Sequenceinput formats with ContentInfo structure inside
- Parameters:
obj- the object we want converted.- Throws:
IllegalArgumentException- if the object cannot be converted.
-
getInstance
public static ContentInfo getInstance(ASN1TaggedObject obj, boolean explicit)
-
getContentType
public ASN1ObjectIdentifier getContentType()
-
getContent
public ASN1Encodable getContent()
-
toASN1Primitive
public ASN1Primitive toASN1Primitive()
Produce an object suitable for an ASN1OutputStream.- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object- Returns:
- a primitive representation of this object.
-
-