code: protected void store(BufferedWriter out, String type, byte[] data) throws IOException
      {
          write(out, type, data);
          out.close();
      }
docs: Write data encoded based64 between PEM line headers and close the writer.
  
  @param out the output buffered writer to write to.
  @param type the type to be put in the header.
  @param data the bytes data to store encoded.
  @throws IOException on error.