GroupDocsGists
10/24/2017 - 1:23 PM

Examples-src-Main-TextDocumentsComparision-CompareTextDcumentsFromStreamToFile.java

// For complete examples and data files, please go to https://github.com/groupdocs-comparison/GroupDocs.Comparison-for-Java
// Create two streams of textFiles
InputStream sourceStream = Main.Utilities.sourceStream(sourceFile);
InputStream targetStream = Main.Utilities.targetStream(targetFile);
// Create instance of GroupDocs.Comparison.Comparison and call method
// Compare.
Comparison comparison = new Comparison();
InputStream result = comparison.compare(sourceStream, targetStream, Utilities.outputFileName(extension),
		ComparisonType.Text);