The diff3 class compares three files or three BufferedReaders.
after comparison, the vector will represente a list of Hunk3
corresponding with blocks of difference.
to generate Hunk3, one can instanciate as follows the class diff3 :
diff3 d = new diff3(file1,file2,file3);
which is equivalent to:
diff3 d = new diff3();
d.diffFile(file1,file2,file3);
To compaire three BufferedReader we have to instanciate as follows:
diff3 d = new diff3();
d.diffBuffer(BufferedReader1,BufferedReader2,BufferedReader3);
The class diff3 includes methods for examining, printing
or saveing blocks of difference:(Hunk3).
Here are some more examples of how diff3 can be used:
diff3 d = new diff3(file1,file2,file3);
d.print();
d.save("diff.txt");
Example using BufferedReader and ED_format:
BufferedReader in0=new BufferedReader(new FileReader(file1));
BufferedReader in1=new BufferedReader(new FileReader(file2));
BufferedReader in2=new BufferedReader(new FileReader(file3));
diff3 d = new diff3();
d.diffBuffer(in0,in1,in2);
d.print_ED();
d.save_ED("diff.txt");
See Also: diff.diff3.getHunk3 See Also: diff.diff3.hunk3At See Also: diff.diff3.numberOfHunk3 See Also: diff.diff3.print See Also: diff.diff3.save |