question: public static String toPem ( Object object ) throws Exception { StringWriter sw = new StringWriter ( ) ; PEMWriter pw = new PEMWriter ( sw ) ; pw . writeObject ( object ) ; pw . flush ( ) ; return sw . toString ( ) ; }
target:  Returns a PEM String representation of a object.