Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ESidenko/6aca7406678527e847f163a9d2cb610e to your computer and use it in GitHub Desktop.
Save ESidenko/6aca7406678527e847f163a9d2cb610e to your computer and use it in GitHub Desktop.

Aspose.Imaging for Java contains set of options to specify license in your Java application or Web service.

You can:

  • Apply a license from a file;
  • Apply a license using a stream;
  • Apply a license using an Embedded Resource;
  • Use metered Licensing.

Interested ?

You may go further at : https://products.aspose.com/imaging/java/

// Instantiate the License class
com.aspose.imaging.License license = new com.aspose.imaging.License();
// Pass the name of the embedded license file
license.setLicense("Aspose.Imaging.lic");
// Instantiate an instance of license and apply the license using a full path
com.aspose.imaging.License license = new com.aspose.imaging.License();
license.setLicense("/some-folder/Aspose.Imaging.lic");
// Instantiate an instance of license and apply the license using a stream
com.aspose.imaging.License license = new com.aspose.imaging.License();
license.setLicense(myStream);
com.aspose.imaging.Metered metered = new com.aspose.imaging.Metered();
//Specify public and private metered keys
metered.setMeteredKey(publicKey, privateKey);
//getConsumptionQuantity of the Metered class.
BigDecimal credit = com.aspose.imaging.Metered.getConsumptionCredit();
BigDecimal quanity = com.aspose.imaging.Metered.getConsumptionQuantity();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment