APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.pkcs

public Class ContentInfo

extends Object
implements DerEncoder
Class Inheritance
All Implemented Interfaces
sun.security.util.DerEncoder
Imports
java.io.*, sun.security.util.*

A ContentInfo type, as defined in PKCS#7.
Author
Benjamin Renaud

Field Summary

Modifier and TypeField and Description
pack-priv DerValue
pack-priv ObjectIdentifier
public static ObjectIdentifier
public static ObjectIdentifier
public static ObjectIdentifier
public static ObjectIdentifier
public static ObjectIdentifier
public static ObjectIdentifier
public static ObjectIdentifier
public static ObjectIdentifier
public static ObjectIdentifier
public static ObjectIdentifier
public static ObjectIdentifier

Constructor Summary

AccessConstructor and Description
public
ContentInfo(ObjectIdentifier contentType, DerValue content)

public
ContentInfo(byte[] bytes)

Make a contentInfo of type data.

public
ContentInfo(DerInputStream derin)

Parses a PKCS#7 content info.

public
ContentInfo(DerInputStream
the ASN.1 encoding of the content info.
derin
,
boolean
flag indicating whether the given content info is encoded according to JDK1.1.x.
oldStyle
)

Parses a PKCS#7 content info.

Method Summary

Modifier and TypeMethod and Description
public void
encode(DerOutputStream out)

Implements sun.security.util.DerEncoder.encode.

DER encode this object and write the results to a stream.

public DerValue
public byte[]
getContentBytes()

Returns a byte array representation of the data held in the content field.

public ObjectIdentifier
public byte[]
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

contentback to summary
pack-priv DerValue content
contentTypeback to summary
pack-priv ObjectIdentifier contentType
DATA_OIDback to summary
public static ObjectIdentifier DATA_OID
DIGESTED_DATA_OIDback to summary
public static ObjectIdentifier DIGESTED_DATA_OID
ENCRYPTED_DATA_OIDback to summary
public static ObjectIdentifier ENCRYPTED_DATA_OID
ENVELOPED_DATA_OIDback to summary
public static ObjectIdentifier ENVELOPED_DATA_OID
NETSCAPE_CERT_SEQUENCE_OIDback to summary
public static ObjectIdentifier NETSCAPE_CERT_SEQUENCE_OID
OLD_DATA_OIDback to summary
public static ObjectIdentifier OLD_DATA_OID
OLD_SIGNED_DATA_OIDback to summary
public static ObjectIdentifier OLD_SIGNED_DATA_OID
PKCS7_OIDback to summary
public static ObjectIdentifier PKCS7_OID
SIGNED_AND_ENVELOPED_DATA_OIDback to summary
public static ObjectIdentifier SIGNED_AND_ENVELOPED_DATA_OID
SIGNED_DATA_OIDback to summary
public static ObjectIdentifier SIGNED_DATA_OID
TIMESTAMP_TOKEN_INFO_OIDback to summary
public static ObjectIdentifier TIMESTAMP_TOKEN_INFO_OID

Constructor Detail

ContentInfoback to summary
public ContentInfo(ObjectIdentifier contentType, DerValue content)
ContentInfoback to summary
public ContentInfo(byte[] bytes)

Make a contentInfo of type data.

ContentInfoback to summary
public ContentInfo(DerInputStream derin) throws IOException

Parses a PKCS#7 content info.

ContentInfoback to summary
public ContentInfo(DerInputStream derin, boolean oldStyle) throws IOException

Parses a PKCS#7 content info.

This constructor is used only for backwards compatibility with PKCS#7 blocks that were generated using JDK1.1.x.

Parameters
derin:DerInputStream

the ASN.1 encoding of the content info.

oldStyle:boolean

flag indicating whether the given content info is encoded according to JDK1.1.x.

Method Detail

encodeback to summary
public void encode(DerOutputStream out)

Implements sun.security.util.DerEncoder.encode.

Doc from sun.security.util.DerEncoder.encode.

DER encode this object and write the results to a stream.

Annotations
@Override
getContentback to summary
public DerValue getContent()
getContentBytesback to summary
public byte[] getContentBytes() throws IOException

Returns a byte array representation of the data held in the content field.

getContentTypeback to summary
public ObjectIdentifier getContentType()
getDataback to summary
public byte[] getData() throws IOException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.