GroupDocsGists
10/24/2017 - 8:24 AM

meteredLicensingOnFiles.java

// For complete examples and data files, please go to https://github.com/groupdocs-comparison/GroupDocs.Comparison-for-Java
// Set metered key
Metered metered = new Metered();
metered.setMeteredKey("****", "****");

// Get consumption quantity from metered
BigDecimal amountBefor = Metered.getConsumptionQuantity();

// Call comparison
String sourcePath = Utilities.sourcePath + sourceFile;
String targetPath = Utilities.sourcePath + targetFile;
Comparer comparer = new Comparer();
comparer.compare(sourcePath, targetPath, new ComparisonSettings());

// Get consumption quantity from metered after several calls of comparison
BigDecimal amountAfter = Metered.getConsumptionQuantity();