int index = 0;
    public void textDeltaEnd() throws SVNException {        // apply all deltas        myCurrentTmpFile = SVNFileUtil.createUniqueFile(myCurrentDirectory, myCurrentFile.getName(), ".tmp");        try {            myCurrentTmpFile.createNewFile();        } catch (IOException e) {            myCurrentTmpFile.delete();            SVNErrorManager.error(0, e);        }        SVNRAFileData target = new SVNRAFileData(myCurrentTmpFile, false);        File fakeBase = SVNFileUtil.createUniqueFile(myCurrentDirectory, myCurrentFile.getName(), ".tmp");        SVNRAFileData base = new SVNRAFileData(fakeBase, true);        try {            int index = 0;            Iterator windows = myDiffWindows.iterator();            for (Iterator files = myDataFiles.iterator(); files.hasNext();) {                File dataFile = (File) files.next();                SVNDiffWindow window = (SVNDiffWindow) windows.next();                // apply to tmp file, use 'fake' base.                InputStream is = null;                try {                    is = new FileInputStream(dataFile);                    window.apply(base, target, is, target.length());                } catch (FileNotFoundException e) {                    SVNErrorManager.error(0, e);                } finally {                    if (is != null) {                        try {                            is.close();                        } catch (IOException e) {                        }                    }                }            }        } finally {            if (target != null) {                try {                    target.close();                } catch (IOException e) {                }            }            if (base != null) {                try {                    base.close();                } catch (IOException e) {                }            }            for (Iterator files = myDataFiles.iterator(); files.hasNext();) {                File file = (File) files.next();                file.delete();            }            if (myDiffWindows != null) {                myDataFiles.clear();                myDiffWindows.clear();            }            fakeBase.delete();        }    }