code: public static void writeDictionary(NaaccrDictionary dictionary, Writer writer) throws IOException {
          try {
              instanciateXStream().marshal(dictionary, new NaaccrPrettyPrintWriter(dictionary, writer));
          }
          catch (XStreamException ex) {
              throw new IOException("Unable to write dictionary", ex);
          }
      }
docs: Writes the given dictionary to the provided writer.
  @param dictionary dictionary to write, cannot be null
  @param writer writer, cannot be null
  @throws IOException if the dictionary could not be written