int sourceOffset = readOffset();
long sourceOffset = readLongOffset();
    public void nextWindow(byte[] data, int offset, int length, String path, ISVNDeltaConsumer consumer) throws SVNException {        appendToBuffer(data, offset, length);        if (myHeaderBytes < 4) {            if (myBuffer.remaining() < 4) {                return;            }            if (myBuffer.get(0) != 'S' || myBuffer.get(1) != 'V' || myBuffer.get(2) != 'N' ||                    myBuffer.get(3) != '\0') {                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.SVNDIFF_CORRUPT_WINDOW, "Svndiff has invalid header");                SVNErrorManager.error(err);            }            myBuffer.position(4);            int remainging = myBuffer.remaining();            myBuffer.compact();            myBuffer.position(0);            myBuffer.limit(remainging);            myHeaderBytes = 4;        }        while(true) {            int sourceOffset = readOffset();            if (sourceOffset < 0) {                return;            }            int sourceLength = readOffset();            if (sourceLength < 0) {                return;            }            int targetLength = readOffset();            if (targetLength < 0) {                return;            }            int instructionsLength = readOffset();            if (instructionsLength < 0) {                return;            }            int newDataLength = readOffset();            if (newDataLength < 0) {                return;            }            if (sourceLength > 0 &&                     (sourceOffset < myLastSourceOffset ||                      sourceOffset + sourceLength < myLastSourceOffset + myLastSourceLength)) {                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.SVNDIFF_CORRUPT_WINDOW, "Svndiff has backwards-sliding source views");                SVNErrorManager.error(err);            }            if (myBuffer.remaining() < instructionsLength + newDataLength) {                return;            }            myLastSourceOffset = sourceOffset;            myLastSourceLength = sourceLength;                        SVNDiffWindow window = new SVNDiffWindow(sourceOffset, sourceLength, targetLength, instructionsLength, newDataLength);            window.setData(myBuffer);            int position = myBuffer.position();            OutputStream os = consumer.textDeltaChunk(path, window);            SVNFileUtil.closeFile(os);            myBuffer.position(position + newDataLength + instructionsLength);            int remains = myBuffer.remaining();            myIsWindowSent = true;                        // then clear the buffer, shift remaining to the beginning.            myBuffer.compact();            myBuffer.position(0);            myBuffer.limit(remains);        }    }