SVNDiffWindowApplyBaton applyBaton = SVNDiffWindowApplyBaton.create(source, target, null); window.apply(applyBaton, new ByteArrayInputStream(data.toByteArray()));
targetView = window.apply(sourceView, data.toByteArray());
    private byte[] getNextTextChunk(int startIndex) throws SVNException {        ByteArrayOutputStream target = new ByteArrayOutputStream();        ByteArrayOutputStream data = new ByteArrayOutputStream();        InputStream source = SVNFileUtil.DUMMY_IN;        for(ListIterator states = myRepStateList.listIterator(startIndex + 1); states.hasPrevious();){            FSRepresentationState state = (FSRepresentationState)states.previous();            data.reset();            SVNDiffWindow window = null;            try{                window = readWindow(state, myChunkIndex, data);            }catch(IOException ioe){                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, ioe.getLocalizedMessage());                SVNErrorManager.error(err, ioe);            }            SVNDiffWindowApplyBaton applyBaton = SVNDiffWindowApplyBaton.create(source, target, null);            window.apply(applyBaton, new ByteArrayInputStream(data.toByteArray()));            if(states.hasPrevious()){                source = new ByteArrayInputStream(target.toByteArray());                target.reset();            }        }        myChunkIndex++;        return target.toByteArray();    }