public int compare(ResourceImpl r1, ResourceImpl r2) { String s1 = getName(r1); String s2 = getName(r2); return s1.compareTo(s2); } }); Tag tag = doIndex(sorted); if (repositoryFileName != null) { ByteArrayOutputStream out = new ByteArrayOutputStream();