Package org.apache.fop.tools.anttasks
Class FileCompare
java.lang.Object
org.apache.fop.tools.anttasks.FileCompare
This class is an extension of Ant, a script utility from
http://ant.apache.org.
It provides methods to compare two files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancompareFiles(File f1, File f2) Compares two files to see if they are equalvoidexecute()Main method of task comparevoidsetFilenames(String filenames) Sets the comma-separated list of files to process.voidsetReferenceDirectory(String referenceDirectory) Sets directory for reference files.voidsetTestDirectory(String testDirectory) Sets directory for test files.
-
Constructor Details
-
FileCompare
public FileCompare()
-
-
Method Details
-
setTestDirectory
Sets directory for test files.- Parameters:
testDirectory- the test directory
-
setReferenceDirectory
Sets directory for reference files.- Parameters:
referenceDirectory- the reference directory
-
setFilenames
Sets the comma-separated list of files to process.- Parameters:
filenames- list of files, comma-separated
-
compareFiles
Compares two files to see if they are equal- Parameters:
f1- first file to comparef2- second file to compare- Returns:
- true if files are same, false otherwise
- Throws:
IOException- if not caught
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionMain method of task compare- Throws:
org.apache.tools.ant.BuildException- If the execution fails.
-