Package org.bouncycastle.util.io.pem
Class PemWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.BufferedWriter
-
- org.bouncycastle.util.io.pem.PemWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.AutoCloseable
public class PemWriter extends java.io.BufferedWriter
A generic PEM writer, based on RFC 1421
-
-
Constructor Summary
Constructors Constructor Description PemWriter(java.io.Writer out)
Base constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOutputSize(PemObject obj)
Return the number of bytes or characters required to contain the passed in object if it is PEM encoded.void
writeObject(PemObjectGenerator objGen)
-
-
-
Method Detail
-
getOutputSize
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
- pem object to be output- Returns:
- an estimate of the number of bytes
-
writeObject
public void writeObject(PemObjectGenerator objGen) throws java.io.IOException
- Throws:
java.io.IOException
-
-