com.sun.labs.minion.test.util
Class FileComparer

java.lang.Object
  extended by com.sun.labs.minion.test.util.FileComparer

public class FileComparer
extends java.lang.Object

Utility class to compare two files, for example to perform a diff.


Constructor Summary
FileComparer(java.lang.String fileName1, java.lang.String fileName2)
          Create an instance of FileComparer with the pathnames of two files.
 
Method Summary
 boolean areLinesEqual()
          Perform a line-by-line comparison from the first file to the second
static void main(java.lang.String[] args)
          Example execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileComparer

public FileComparer(java.lang.String fileName1,
                    java.lang.String fileName2)
             throws java.io.IOException
Create an instance of FileComparer with the pathnames of two files.

Parameters:
fileName1 - pathname of file1
fileName2 - pathname of file2
Throws:
java.io.IOException
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Example execution.

Parameters:
args - pass in the two files to be compared
Throws:
java.io.IOException

areLinesEqual

public boolean areLinesEqual()
                      throws java.io.IOException
Perform a line-by-line comparison from the first file to the second

Returns:
true if the files are equal
Throws:
java.io.IOException