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

public Class PemWriter

extends BufferedWriter
Class Inheritance
Imports
java.io.BufferedWriter, .IOException, .Writer, java.util.Iterator, org.bouncycastle.util.Strings, org.bouncycastle.util.encoders.Base64

A generic PEM writer, based on RFC 1421

Field Summary

Modifier and TypeField and Description
private char[]
private static final int
private final int

Constructor Summary

AccessConstructor and Description
public
PemWriter(Writer
output stream to use.
out
)

Base constructor.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

an estimate of the number of bytes
getOutputSize
(PemObject
pem object to be output
obj
)

Return the number of bytes or characters required to contain the passed in object if it is PEM encoded.

private void
writeEncoded(byte[] bytes)

public void
private void
private void
Inherited from java.io.BufferedWriter:
closeflushnewLinewritewritewrite

Field Detail

bufback to summary
private char[] buf
LINE_LENGTHback to summary
private static final int LINE_LENGTH
nlLengthback to summary
private final int nlLength

Constructor Detail

PemWriterback to summary
public PemWriter(Writer out)

Base constructor.

Parameters
out:Writer

output stream to use.

Method Detail

getOutputSizeback to summary
public int getOutputSize(PemObject obj)

Return the number of bytes or characters required to contain the passed in object if it is PEM encoded.

Parameters
obj:PemObject

pem object to be output

Returns:int

an estimate of the number of bytes

writeEncodedback to summary
private void writeEncoded(byte[] bytes) throws IOException
writeObjectback to summary
public void writeObject(PemObjectGenerator objGen) throws IOException
writePostEncapsulationBoundaryback to summary
private void writePostEncapsulationBoundary(String type) throws IOException
writePreEncapsulationBoundaryback to summary
private void writePreEncapsulationBoundary(String type) throws IOException