private String putChangelogDiffsIntoFile( IGitAPI git, String branchName, String revFrom, String revTo) throws IOException { ByteArrayOutputStream fos = new ByteArrayOutputStream(); // fos.write("<data><![CDATA[".getBytes()); String changeset = "Changes in branch " + branchName + ", between " + revFrom + " and " + revTo + "\n"; fos.write(changeset.getBytes()); git.changelog(revFrom, revTo, fos); // fos.write("]]></data>".getBytes()); fos.close(); return fos.toString(); }