public class SVNDeltaProcessor
extends java.lang.Object
Constructor and Description |
---|
SVNDeltaProcessor()
Creates a processor.
|
Modifier and Type | Method and Description |
---|---|
void |
applyTextDelta(java.io.File baseFile,
java.io.File targetFile,
boolean computeCheksum)
Starts processing deltas given a base file and a one
to write resultant target bytes to.
|
void |
applyTextDelta(java.io.InputStream baseIS,
java.io.File targetFile,
boolean computeTargetCheksum)
Starts processing deltas given a base file and a one
to write resultant target bytes to.
|
void |
applyTextDelta(java.io.InputStream base,
java.io.OutputStream target,
boolean computeCheksum)
Starts processing deltas given a base file stream and an output stream
to write resultant target bytes to.
|
java.io.OutputStream |
textDeltaChunk(SVNDiffWindow window)
Receives a next diff window to be applied.
|
java.lang.String |
textDeltaEnd()
Performs delta processing finalizing steps.
|
public void applyTextDelta(java.io.InputStream base, java.io.OutputStream target, boolean computeCheksum)
If a target full text is a newly added file (text deltas would be vs. empty),
then source bytes are not needed and base
may be passed as
null.
If computeChecksum
is true, then
an MD5 checksum will be calculated for target bytes. The calculated checksum is
returned by textDeltaEnd()
.
base
- an input stream to take base file contents
fromtarget
- an output stream to write the resultant target
contents tocomputeCheksum
- true to calculate
checksumpublic void applyTextDelta(java.io.File baseFile, java.io.File targetFile, boolean computeCheksum) throws SVNException
If a target full text is a newly added file (text deltas would be vs. empty),
then source bytes are not needed and baseFile
may be passed as
null.
If a file represented by targetFile
does not exist
yet, first tries to create an empty file.
If computeChecksum
is true, then
an MD5 checksum will be calculated for target bytes. The calculated checksum is
returned by textDeltaEnd()
.
baseFile
- a base file to read base file contents
fromtargetFile
- a destination file where resultant
target bytes will be writtencomputeCheksum
- true to calculate
checksumSVNException
public void applyTextDelta(java.io.InputStream baseIS, java.io.File targetFile, boolean computeTargetCheksum) throws SVNException
If a target full text is a newly added file (text deltas would be vs. empty),
then source bytes are not needed and baseIS
may be passed as
null.
If a file represented by targetFile
does not exist
yet, first tries to create an empty file.
If computeTargetChecksum
is true, then
an MD5 checksum will be calculated for target bytes. The calculated checksum is
returned by textDeltaEnd()
.
baseIS
- an input stream to take base file contents
fromtargetFile
- a destination file where resultant
target bytes will be writtencomputeTargetCheksum
- true to calculate
checksum of the target textSVNException
public java.io.OutputStream textDeltaChunk(SVNDiffWindow window) throws SVNException
window
- a diff windowSVNException
public java.lang.String textDeltaEnd()
Copyright © 2004-2012 TMate Software Ltd. All Rights Reserved.