|
JavaSVN Home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tmatesoft.svn.core.io.diff.SVNDiffWindow
The SVNDiffWindow class represents a diff window that contains instructions and new data of a delta to apply to a file.
| Constructor Summary | |
SVNDiffWindow(long sourceViewOffset,
long sourceViewLength,
long targetViewLength,
long instructionsLength,
long newDataLength)
Constructs an SVNDiffWindow object. |
|
SVNDiffWindow(long sourceViewOffset,
long sourceViewLength,
long targetViewLength,
SVNDiffInstruction[] instructions,
long newDataLength)
Constructs an SVNDiffWindow object. |
|
| Method Summary | |
void |
apply(SVNDiffWindowApplyBaton applyBaton,
InputStream newData)
Applies this window's instructions. |
SVNDiffInstruction |
getInstructionAt(int index)
Gets a definite diff instruction from an array of instructions. |
int |
getInstructionsCount()
Returns the number of instructions contained in this diff window. |
long |
getInstructionsLength()
Returns the length of instructions in bytes. |
long |
getNewDataLength()
Returns the number of new data bytes to copy to the target view. |
long |
getSourceViewLength()
Returns the number of bytes to copy from the source view to the target one. |
long |
getSourceViewOffset()
Returns the source view offset. |
long |
getTargetViewLength()
Returns the length in bytes of the target view. |
String |
toString()
Gives a string representation of this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SVNDiffWindow(long sourceViewOffset,
long sourceViewLength,
long targetViewLength,
SVNDiffInstruction[] instructions,
long newDataLength)
sourceViewOffset - an offset in the source viewsourceViewLength - a number of bytes to read from the
source viewtargetViewLength - a length in bytes of the target view
it must have after copying bytesinstructions - diff instructions to copy bytesnewDataLength - a number of bytes of new data
public SVNDiffWindow(long sourceViewOffset,
long sourceViewLength,
long targetViewLength,
long instructionsLength,
long newDataLength)
sourceViewOffset - an offset in the source viewsourceViewLength - a number of bytes to read from the
source viewtargetViewLength - a length in bytes of the target view
it must have after copying bytesinstructionsLength - a number of instructions bytesnewDataLength - a number of bytes of new dataSVNDiffInstruction| Method Detail |
public long getInstructionsLength()
public long getSourceViewOffset()
public long getSourceViewLength()
public long getTargetViewLength()
public int getInstructionsCount()
public SVNDiffInstruction getInstructionAt(int index)
index - a zero based instruction index
indexpublic long getNewDataLength()
public void apply(SVNDiffWindowApplyBaton applyBaton,
InputStream newData)
throws SVNException
applyBaton.
If this window has got any SVNDiffInstruction.COPY_FROM_SOURCE instructions, then:
applyBaton to the baton's inner source buffer.
SVNDiffInstruction.COPY_FROM_SOURCE instructions of this window are
relative to the bounds of that source buffer (source view, in other words).
applyBaton is supplied with an MD5 digest, updates it with those bytes
in the target buffer. So, after instructions applying completes, it will be the checksum for
the full text.
SVNDiffInstruction.COPY_FROM_NEW_DATA instructions are relative to the bounds of
the provided newData stream.
SVNDiffInstruction.COPY_FROM_TARGET instructions are relative to the bounds of
the target buffer.
applyBaton - a baton that provides the source and target
viewsnewData - an input stream to read new data bytes from
SVNExceptionpublic String toString()
|
JavaSVN Home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||