question: public static void saveX509Cert ( String certStr , File certFile ) throws IOException { BufferedWriter writer = new BufferedWriter ( new FileWriter ( certFile ) ) ; writer . write ( BEGIN_CERT ) ; writer . newLine ( ) ; writer . write ( certStr ) ; writer . newLine ( ) ; writer . write ( END_CERT ) ; writer . newLine ( ) ; writer . close ( ) ; }
target:  Save a certificate to a file in base 64 binary format with BEGIN and END strings