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 boolean
compareFiles
(File f1, File f2) Compares two files to see if they are equalvoid
execute()
Main method of task comparevoid
setFilenames
(String filenames) Sets the comma-separated list of files to process.void
setReferenceDirectory
(String referenceDirectory) Sets directory for reference files.void
setTestDirectory
(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.
-