public String write() {
        List<JavaClass> classes = new ArrayList<JavaClass>(parser.getBuilder().getClasses());
        Collections.sort(classes, new ClassComparator());

        List<Version> vs = new ArrayList<Version>(parser.getVersions());
        Collections.sort(vs);
        Collections.reverse(vs);

        buffer.write("<h1>Contents</h1>");

        buffer.write("<ul>");
        for (Version version : vs) {
            buffer.write("\n");
            buffer.write("<li><a href=\"#" + version.get() + "\">Bitwig Studio " + version.get()
                    + "</a></li>\n");
        }
        buffer.write("</ul>");

        for (Version version : vs) {
            buffer.write("\n");
            buffer.write("<h1 id=\"" + version.get() + "\">Bitwig Studio " + version.get()
                    + "</h1>\n");
            buffer.write("\n");

            for (JavaClass javaClass : classes) {
                if (javaClass.isInner())
                    continue;

                StringBuilder sb = new StringBuilder();
                boolean found = false;

                String extra = "";
                if (introducedIn(version, javaClass)) {
                    extra = " - New";
                }

                sb.append("\n");
                sb.append("<h2>" + javaClass.getName() + extra + "</h2>\n");
                sb.append("\n");

                sb.append("<ul>");
                List<JavaMethod> list = parser.getSinceMethods(version.get());
                List<JavaMethod> methods = new ArrayList<JavaMethod>(list);
                Collections.sort(methods, new MethodComparator());
                for (JavaMethod method : methods) {
                    if (method.getDeclaringClass().equals(javaClass)) {
                        String methodString = new ChangesMethodWriter().writeMethod(method)
                                .toString();
                        sb.append("<li>" + methodString + "</li>\n");
                        found = true;
                    }
                }
                sb.append("</ul>");

                if (found)
                    buffer.write(sb.toString());
            }
        }

        return buffer.toString();
    }