◆ DiffParser() [1/2]
ppt4j.diff.DiffParser.DiffParser |
( |
URL | url | ) |
throws IOException |
◆ DiffParser() [2/2]
ppt4j.diff.DiffParser.DiffParser |
( |
String | patchPath | ) |
throws IOException |
◆ download()
byte[] ppt4j.diff.DiffParser.download |
( |
URL | url | ) |
throws IOException |
Downloads a file from the provided URL. If the file already exists locally, it reads its contents into a byte array. If the file does not exist, it creates a new file, downloads the contents from the URL, writes the contents to the file, and performs an integrity check. If an IOException occurs during the download process, the error is logged and the system exits with status code 1.
- Parameters
-
url | the URL pointing to the file to download |
- Returns
- a byte array containing the downloaded file contents
◆ getFileDiff()
FileDiff ppt4j.diff.DiffParser.getFileDiff |
( |
int | diffIndex | ) |
|
Returns the FileDiff object at the specified index in the list of file differences.
- Parameters
-
diffIndex | the index of the FileDiff object to retrieve |
- Returns
- the FileDiff object at the specified index
◆ getFileName()
String ppt4j.diff.DiffParser.getFileName |
( |
int | diffIndex, |
|
|
boolean | removePrefix ) |
Returns the file name at the specified index in the list of differences. If the file name is "/dev/null", then it returns the file name at the "to" side of the difference instead. If removePrefix is true, it removes any directory path prefixes from the file name before returning.
- Parameters
-
diffIndex | the index of the difference |
removePrefix | whether to remove directory path prefixes from the file name |
- Returns
- the file name at the specified index in the list of differences
◆ getNumOfDiffs()
int ppt4j.diff.DiffParser.getNumOfDiffs |
( |
| ) |
|
Returns the number of differences in the list.
- Returns
- the number of differences in the list
◆ toString()
String ppt4j.diff.DiffParser.toString |
( |
| ) |
|
Returns a string representation of this object by iterating through the list of FileDiffs and appending the file name and the string representation of each FileDiff to a StringBuilder.
- Returns
- a string representation of this object
The documentation for this class was generated from the following file: