Class PemWriter

java.lang.Object
java.io.Writer
java.io.BufferedWriter
org.bouncycastle.util.io.pem.PemWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class PemWriter extends BufferedWriter
A generic PEM writer, based on RFC 1421
  • Constructor Details

    • PemWriter

      public PemWriter(Writer out)
      Base constructor.
      Parameters:
      out - output stream to use.
  • Method Details

    • 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 IOException
      Throws:
      IOException