Collections.sort(data,  new Compare() );
    private void writeDirection(PrintStream ps, String langFrom, String langTo, ArrayList<TableRow> data){        ps.println(String.format("<direction from=\"%s\" to=\"%s\" >", langFrom, langTo));        for (TableRow row:data){            String lang1 = escapeXML(row.getLang1());            String lang2 = escapeXML(row.getLang2());            ps.println(String.format("<item lang1=\"%s\" lang2=\"%s\"   />", lang1, lang2));        }        ps.println("</direction>");    }