| Constructor and Description |
|---|
PatchFile(org.eclipse.jgit.lib.Repository repo,
PatchList patchList,
String fileName) |
| Modifier and Type | Method and Description |
|---|---|
String |
getLine(int file,
int line)
Extract a line from the file, as a string.
|
int |
getLineCount(int file)
Return number of lines in file.
|
public PatchFile(org.eclipse.jgit.lib.Repository repo,
PatchList patchList,
String fileName)
throws org.eclipse.jgit.errors.MissingObjectException,
org.eclipse.jgit.errors.IncorrectObjectTypeException,
IOException
org.eclipse.jgit.errors.MissingObjectExceptionorg.eclipse.jgit.errors.IncorrectObjectTypeExceptionIOExceptionpublic String getLine(int file, int line) throws IOException, NoSuchEntityException
file - the file index to extract.line - the line number to extract (1 based; 1 is the first line).IOException - the patch or complete file content cannot be read.NoSuchEntityExceptionpublic int getLineCount(int file)
throws IOException,
NoSuchEntityException
file - the file index to extract.IOException - the patch or complete file content cannot be read.NoSuchEntityException - the file is not exist.