public class

ContentInfo

extends Object
java.lang.Object
   ↳ sun.security.pkcs.ContentInfo

Class Overview

A ContentInfo type, as defined in PKCS#7.

Summary

Fields
public static ObjectIdentifier DATA_OID
public static ObjectIdentifier DIGESTED_DATA_OID
public static ObjectIdentifier ENCRYPTED_DATA_OID
public static ObjectIdentifier ENVELOPED_DATA_OID
public static ObjectIdentifier NETSCAPE_CERT_SEQUENCE_OID
public static ObjectIdentifier OLD_DATA_OID
public static ObjectIdentifier OLD_SIGNED_DATA_OID
public static ObjectIdentifier PKCS7_OID
public static ObjectIdentifier SIGNED_AND_ENVELOPED_DATA_OID
public static ObjectIdentifier SIGNED_DATA_OID
public static ObjectIdentifier TIMESTAMP_TOKEN_INFO_OID
Public Constructors
ContentInfo(ObjectIdentifier contentType, DerValue content)
ContentInfo(byte[] bytes)
Make a contentInfo of type data.
ContentInfo(DerInputStream derin)
Parses a PKCS#7 content info.
ContentInfo(DerInputStream derin, boolean oldStyle)
Parses a PKCS#7 content info.
Public Methods
void encode(DerOutputStream out)
DerValue getContent()
byte[] getContentBytes()
Returns a byte array representation of the data held in the content field.
ObjectIdentifier getContentType()
byte[] getData()
String toString()
Returns a string representation of the object.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static ObjectIdentifier DATA_OID

public static ObjectIdentifier DIGESTED_DATA_OID

public static ObjectIdentifier ENCRYPTED_DATA_OID

public static ObjectIdentifier ENVELOPED_DATA_OID

public static ObjectIdentifier NETSCAPE_CERT_SEQUENCE_OID

public static ObjectIdentifier OLD_DATA_OID

public static ObjectIdentifier OLD_SIGNED_DATA_OID

public static ObjectIdentifier PKCS7_OID

public static ObjectIdentifier SIGNED_AND_ENVELOPED_DATA_OID

public static ObjectIdentifier SIGNED_DATA_OID

public static ObjectIdentifier TIMESTAMP_TOKEN_INFO_OID

Public Constructors

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 derin, boolean oldStyle)

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 the ASN.1 encoding of the content info.
oldStyle flag indicating whether or not the given content info is encoded according to JDK1.1.x.

Public Methods

public void encode (DerOutputStream out)

Throws
IOException

public DerValue getContent ()

public byte[] getContentBytes ()

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

Throws
IOException

public ObjectIdentifier getContentType ()

public byte[] getData ()

Throws
IOException

public String toString ()

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
  • a string representation of the object.