editor.applyTextDelta(null);
editor.applyTextDelta(filePath, null);
    private static SVNCommitInfo modifyFile(ISVNEditor editor, String dirPath,            String filePath, byte[] newData) throws SVNException {        /*         * Always called first. Opens the current root directory. It means all         * modifications will be applied to this directory until the next entry         * (located inside the root) is opened.         */        editor.openRoot(-1);        /*         * Opens a next subdirectory (in this example program it's the directory         * added in the last commit). Since this moment all changes will be         * applied to this directory.         *          * dirPath is relative to the root directory.         */        editor.openDir(dirPath, -1);        /*         * Opens the file added in the previous commit.         *          * filePath is also defined as a relative path to the root directory.         */        editor.openFile(filePath, -1);        /*         * The next steps are directed to applying and writing the file delta.         */        editor.applyTextDelta(null);        long deltaLength = newData.length;        /*         * Creating a new diff window (provided the size of the delta -         * deltaLength) that will contain instructions of applying the delta to         * the file in the repository.         */        SVNDiffWindow diffWindow = SVNDiffWindowBuilder                .createReplacementDiffWindow(deltaLength);        /*         * Gets an OutputStream where the delta will be written to.         */        OutputStream os = editor.textDeltaChunk(diffWindow);        try {            /*             * If there's non-empty file delta this code writes the delta to the             * OutputStream.             */            for (int i = 0; i < deltaLength; i++) {                os.write(newData[i]);            }        } catch (IOException ioe) {            System.err.println("An i/o error while writing the delta bytes: "                    + ioe.getMessage());        } finally {            /*            * Don't forget to close the stream after you have written the            * delta!            */            if (os != null) {                try {                    os.close();                } catch (IOException ioeInternal) {                    //                }            }        }        /*         * Finally closes the delta when all the bytes are already written. From         * this point the previously defined diff window knows how to apply the         * delta to the file.         */        editor.textDeltaEnd();        /*         * Closes the file.         */        editor.closeFile(null);        /*         * Closes the directory.         */        editor.closeDir();        /*         * Closes the root directory.         */        editor.closeDir();        /*         * This is the final point in all editor handling. Only now all that new         * information previously described with the editor's methods is sent to         * the server for committing. As a result the server sends the new         * commit information.         */        return editor.closeEdit();    }