code: private static void writeFooter(BufferedWriter out, String type) throws IOException
      {
          out.write(PEM_END + type + DASHES);
          out.newLine();
      }
docs: Write a PEM like footer.
  
  @param out the output buffered writer to write to.
  @param type the type to be written in the footer.
  @throws IOException on error.