code: public void serialize(OutputStream out) throws IOException {
      Iterator<Entry> entries = new Iterator<Entry>() {
  
        Iterator<String> iterator = dictionary.keySet().iterator();
  
        public boolean hasNext() {
          return iterator.hasNext();
        }
  
        public Entry next() {
  
          String word = iterator.next();
          List<Triple> triples = dictionary.get(word);
          Attributes tagAttribute = new Attributes();
  
          String[] tags = new String[triples.size()];
          String[] lemmas = new String[triples.size()];
          String[] feats = new String[triples.size()];
  
          int i = 0;
          for (Triple t : triples) {
            tags[i] = t.getClazz();
            lemmas[i] = t.getLemma();
            feats[i++] = t.getFeats();
          }
  
          tagAttribute.setValue(ATTR_TAGS, tagsToString(tags));
          tagAttribute.setValue(ATTR_LEMMAS, tagsToString(lemmas));
          tagAttribute.setValue(ATTR_FEATS, tagsToString(feats));
  
          return new Entry(new StringList(word), tagAttribute);
        }
  
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
  
      DictionaryEntryPersistor.serialize(out, entries, caseSensitive);
    }
docs: Writes the {@link ExtendedPOSDictionary} to the given {@link OutputStream};
  
  After the serialization is finished the provided {@link OutputStream}
  remains open.
  
  @param out
  the {@link OutputStream} to write the dictionary into.
  
  @throws IOException
  if writing to the {@link OutputStream} fails