|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.sahits.test.FileComparator
public final class FileComparator
This file comparator can compare to text based files.
| Constructor Summary | |
|---|---|
FileComparator(java.lang.String fileName)
Initialize this instance with the instance with the file to be compared to |
|
| Method Summary | |
|---|---|
ComparetorResult |
equals(java.lang.String fileName)
Compare the file denoted by fileName to the file initialized in
the constructor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileComparator(java.lang.String fileName)
throws java.io.FileNotFoundException
fileName - absolute path to the file
java.io.FileNotFoundException - fileName was not a valid path| Method Detail |
|---|
public ComparetorResult equals(java.lang.String fileName)
throws java.io.IOException
fileName to the file initialized in
the constructor.
The comparison ignores empty lines. Multiple spaces and tabs are handled as a
single space.
Tow textual files are equal under the above assumptions when every line of the
file is equal.
fileName - absolute path of the file to compare this to
java.io.FileNotFoundException - fileName was not a valid path
java.io.IOException - Error during the reading of the file
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||