Package com.google.gerrit.server.patch
Class PatchFile
- java.lang.Object
- 
- com.google.gerrit.server.patch.PatchFile
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLine(int file, int line)Extract a line from the file, as a string.intgetLineCount(int file)Return number of lines in file.
 
- 
- 
- 
Constructor Detail- 
PatchFilepublic PatchFile(org.eclipse.jgit.lib.Repository repo, PatchList patchList, String fileName) throws org.eclipse.jgit.errors.MissingObjectException, org.eclipse.jgit.errors.IncorrectObjectTypeException, IOException- Throws:
- org.eclipse.jgit.errors.MissingObjectException
- org.eclipse.jgit.errors.IncorrectObjectTypeException
- IOException
 
 
- 
 - 
Method Detail- 
getLinepublic String getLine(int file, int line) throws IOException, NoSuchEntityException Extract a line from the file, as a string.- Parameters:
- file- the file index to extract.
- line- the line number to extract (1 based; 1 is the first line).
- Returns:
- the string version of the file line.
- Throws:
- IOException- the patch or complete file content cannot be read.
- NoSuchEntityException
 
 - 
getLineCountpublic int getLineCount(int file) throws IOException, NoSuchEntityExceptionReturn number of lines in file.- Parameters:
- file- the file index to extract.
- Returns:
- number of lines in file.
- Throws:
- IOException- the patch or complete file content cannot be read.
- NoSuchEntityException- the file is not exist.
 
 
- 
 
-