public static void save(SVNDiffWindow window, boolean saveHeader, RandomAccessFile file) throws IOException {
public static void save(SVNDiffWindow window, boolean saveHeader, OutputStream os) throws IOException {
    public static void save(SVNDiffWindow window, boolean saveHeader, RandomAccessFile file) throws IOException {        if (saveHeader) {            file.write(HEADER_BYTES);        }         if (!window.hasInstructions()) {            return;        }        ByteArrayOutputStream bos = new ByteArrayOutputStream();        saveInstructions(window, bos);        long[] offsets = new long[5];        offsets[0] = window.getSourceViewOffset();        offsets[1] = window.getSourceViewLength();        offsets[2] = window.getTargetViewLength();        offsets[3] = bos.size();        offsets[4] = window.getNewDataLength();        for(int i = 0; i < offsets.length; i++) {            writeInt(file, offsets[i]);        }        file.write(bos.toByteArray());    }