Top Description Fields Constructors Methods
org.bouncycastle.util.io.pem

public Class PemObject

extends Object
implements PemObjectGenerator
Class Inheritance
All Implemented Interfaces
org.bouncycastle.util.io.pem.PemObjectGenerator
Imports
java.util.ArrayList, .Collections, .List, org.bouncycastle.util.Arrays

A generic PEM object - type, header properties, and byte content.

Field Summary

Modifier and TypeField and Description
private byte[]
private static final List<E>
private List<E>
private String

Constructor Summary

AccessConstructor and Description
public
PemObject(String
pem object type.
type
,
byte[]
the binary content of the object.
content
)

Generic constructor for object without headers.

public
PemObject(String
pem object type.
type
,
List<E>
a list of PemHeader objects.
headers
,
byte[]
the binary content of the object.
content
)

Generic constructor for object with headers.

Method Summary

Modifier and TypeMethod and Description
public PemObject
public byte[]
public List<E>
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentback to summary
private byte[] content
EMPTY_LISTback to summary
private static final List<E> EMPTY_LIST
headersback to summary
private List<E> headers
typeback to summary
private String type

Constructor Detail

PemObjectback to summary
public PemObject(String type, byte[] content)

Generic constructor for object without headers.

Parameters
type:String

pem object type.

content:byte[]

the binary content of the object.

PemObjectback to summary
public PemObject(String type, List<E> headers, byte[] content)

Generic constructor for object with headers.

Parameters
type:String

pem object type.

headers:List<E>

a list of PemHeader objects.

content:byte[]

the binary content of the object.

Method Detail

generateback to summary
public PemObject generate() throws PemGenerationException

Implements org.bouncycastle.util.io.pem.PemObjectGenerator.generate.

Doc from org.bouncycastle.util.io.pem.PemObjectGenerator.generate.

Generate a PEM object.

Returns:PemObject

the generated object.

Exceptions
PemGenerationException:
on failure.
getContentback to summary
public byte[] getContent()
getHeadersback to summary
public List<E> getHeaders()
getTypeback to summary
public String getType()