Class Diff

java.lang.Object
com.softwaremining.jcl.Diff

public class Diff extends Object
Simple utility to do a comparison between file. This is used primarily in testing ... to programmatically ensure that data-migrated files are same as those on mainframe.
  • Constructor Details

    • Diff

      public Diff()
  • Method Details

    • execute

      public static int execute(String fileName1, String fileName2)
      Compare characters within the file, and return the number of differences
      Parameters:
      fileName1 -
      fileName2 -
      Returns:
      : the number of differences
    • diff

      public static int diff(char[] contents1, char[] contents2)
    • diff

      public static int diff(byte[] contents1, byte[] contents2)
    • getFileAsChars

      public static char[] getFileAsChars(String filename) throws IOException
      Throws:
      IOException