code: public static void saveX509Cert( Certificate cert, File certFile ) throws GeneralSecurityException, IOException
      {
          saveX509Cert( new Certificate[]{cert}, certFile );
      }
docs: Save a certificate to a file. Remove all the content in the file if there is any before.
  
  @param cert
  @param certFile
  @throws GeneralSecurityException
  @throws IOException