code: private static void writeStringMap(SymbolTable map, ObjectOutput out)
        throws IOException {
      out.writeInt(map.size());
      for (ObjectIntCursor<String> cursor : map) {
        out.writeUTF(cursor.key);
        out.writeInt(cursor.value);
      }
    }
docs: Serializes a symbol map to an ObjectOutput
  
  @param map the symbol map to serialize
  @param out the ObjectOutput. It should be already be initialized by the caller.