org.sourcejammer.server.source
Class TextDiff
java.lang.Object
|
+--JLibDiff.SJDiff
|
+--org.sourcejammer.server.source.TextDiff
- All Implemented Interfaces:
- JLibDiff.define, Delta, JLibDiff.HunkVisitable, java.io.Serializable
- public class TextDiff
- extends SJDiff
- implements java.io.Serializable, Delta
Title: $FileName: TextDiff.java$
- Version:
- $VerNum: 5$
$KeyWordsOff: $
Builds a diff from two text files and can reconstruct the second file
when passed the first, using the type of EOL characters requested.
- Author:
- $AuthorName: Rob MacGrogan$
- See Also:
- Serialized Form
Field Summary |
private int |
miEOL
|
Fields inherited from class JLibDiff.SJDiff |
|
Fields inherited from interface JLibDiff.define |
DELETE, INSERT, MAXLINES, ORIGIN |
Methods inherited from class JLibDiff.SJDiff |
accept, diffBuffer, diffByteArray, diffFile, diffString, diffTextLineIterator, diffTextLineReader, getHunk, getUnderlyingVector, hunkAt, numberOfHunk, print, setEndOfLine, supressEndOfLine |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
miEOL
private int miEOL
TextDiff
public TextDiff()
- Constructs an empty TextDiff.
TextDiff
public TextDiff(JLibDiff.diff d)
TextDiff
public TextDiff(java.util.Vector v)
TextDiff
public TextDiff(TextLineReader fileOne,
TextLineReader fileTwo)
throws java.io.IOException,
EndOfSourceException
- Constructs a TextDiff using the two TextLineReaders.
buildFileTextLineIterator
public TextLineIteratorOutput buildFileTextLineIterator(TextLineIteratorOutput parent)
throws InvalidSourceException,
java.io.IOException,
EndOfSourceException
- Reconstructs fileTwo and returns it as a TextLineIterator.
- Parameters:
parent
- -- fileOne as a TextLineReader.
- Returns:
- a TextLineIterator containing the reconstructed fileTwo used to
originally build this TextDiff.
InvalidSourceException
java.io.IOException
EndOfSourceException
clipReturnCharFromDiffLine
public java.lang.String clipReturnCharFromDiffLine(java.lang.String line,
java.lang.String sEOL,
int iEOLLength)
- Clips the specified string from the end of the line. Not necessary anymore, I think.
Copyright © 2003 Soucejammer project.