applyBaton.close();
        public void textDeltaEnd(String path) throws SVNException {            File sourceFile = new File(myRootDirectory, myCurrentPath);            try {                sourceFile.createNewFile();            } catch (IOException ioe) {                sourceFile.delete();                throw new SVNException(ioe);            }            File targetFile = new File(myRootDirectory, myCurrentPath + ".tmp");            /*             * if myDiffWindows is null - the file is empty.             */            if (myDiffWindows != null) {                SVNDiffWindowApplyBaton applyBaton = SVNDiffWindowApplyBaton.create(sourceFile, targetFile, null);                try {                    for (Iterator windows = myDiffWindows.iterator(); windows.hasNext();) {                        /*                         * obtains a next SVNDiffWindow.                          */                        SVNDiffWindow window = (SVNDiffWindow) windows.next();                        if (window == null)                            continue;                        InputStream newData = null;                                                try {                            /*                             * Gets the InputStream based upon the OutpruStream (where                             * the delta was written to) that is associated with the                             * current window                             */                            newData = myMediator.getTemporaryLocation(window);                            /*                             * Here the delta is applied.                             * target is the file where the dleta is being written.                             *                              * newData - source bytes stored in a temporary delta                              * storage.                             *                              * The last parameter - offset in the file - is to be the                              * current file size. If some delta chunk consists of bytes                             * of the same value the server won't transmit the full                              * chunk but provide one byte and an instruction how many                             * times it should be repeated. These bytes are written to                             * the current end of the file.                               */                            window.apply(applyBaton, newData);                        } catch (IOException ioe) {                            throw new SVNException(                                    "error while fetching a temporary delta storage.");                        } finally {                            if (newData != null) {                                try {                                    newData.close();                                } catch (IOException e1) {                                    //                                }                            }                            /*                             * doesn't need the temporary storage anymore.                             */                            myMediator.deleteTemporaryLocation(window);                        }                    }                } finally {                    if (targetFile.exists()) {                        sourceFile.delete();                        targetFile.renameTo(sourceFile);                    }                                        myDiffWindows.clear();                    myDiffWindows = null;                }            }        }