org.eclipse.jgit.diff
Class PatchIdDiffFormatter
java.lang.Object
org.eclipse.jgit.diff.DiffFormatter
org.eclipse.jgit.diff.PatchIdDiffFormatter
public class PatchIdDiffFormatter
- extends DiffFormatter
A DiffFormatter used to calculate the patch-id of the diff.
Methods inherited from class org.eclipse.jgit.diff.DiffFormatter |
flush, format, format, format, format, format, format, format, getNewPrefix, getOldPrefix, getOutputStream, getPathFilter, getRenameDetector, isDetectRenames, release, scan, scan, scan, setAbbreviationLength, setBinaryFileThreshold, setContext, setDetectRenames, setDiffAlgorithm, setDiffComparator, setNewPrefix, setOldPrefix, setPathFilter, setProgressMonitor, setRepository, toFileHeader, writeAddedLine, writeContextLine, writeLine, writeRemovedLine |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PatchIdDiffFormatter
public PatchIdDiffFormatter()
- Initialize a formatter to compute a patch id.
getCalulatedPatchId
public ObjectId getCalulatedPatchId()
- Should be called after having called one of the format methods
- Returns:
- the patch id calculated for the provided diff.
writeHunkHeader
protected void writeHunkHeader(int aStartLine,
int aEndLine,
int bStartLine,
int bEndLine)
throws IOException
- Description copied from class:
DiffFormatter
- Output a hunk header
- Overrides:
writeHunkHeader
in class DiffFormatter
- Parameters:
aStartLine
- within first sourceaEndLine
- within first sourcebStartLine
- within second sourcebEndLine
- within second source
- Throws:
IOException
formatIndexLine
protected void formatIndexLine(OutputStream o,
DiffEntry ent)
throws IOException
- Overrides:
formatIndexLine
in class DiffFormatter
- Parameters:
o
- the stream the formatter will write line data toent
- the DiffEntry to create the FileHeader for
- Throws:
IOException
- writing to the supplied stream failed.
Copyright © 2012. All Rights Reserved.