public final class License extends java.lang.Object implements ILicense
Provides methods to license the component.
In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly.
License license = new License(); license.setLicense("MyLicense.lic");
| Constructor and Description |
|---|
License()
Initializes a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getVersion()
Returns version of Aspose.Slides for Java.
|
boolean |
isLicensed()
Check if licence is applied to component
|
void |
resetLicense()
Reset the license.
|
void |
setLicense(java.io.InputStream stream)
Licenses the component.
|
void |
setLicense(java.lang.String namePath)
Licenses the component.
|
public License()
Initializes a new instance of this class.
In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly.
License license = new License(); license.setLicense("MyLicense.lic");
public final void setLicense(java.io.InputStream stream)
throws AsposeLicenseException
Licenses the component.
In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly.
License license = new License(); license.setLicense("MyLicense.lic");
setLicense in interface ILicensestream - A stream that contains the license. Use null to switch to
evaluation mode.AsposeLicenseExceptionpublic final void setLicense(java.lang.String namePath)
throws AsposeLicenseException
Licenses the component.
In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly.
License license = new License(); license.setLicense("MyLicense.lic");
setLicense in interface ILicensenamePath - Can be a full or short file name or name of an embedded resource.
Use an empty string to switch to evaluation mode.AsposeLicenseExceptionpublic static final java.lang.String getVersion()
public final void resetLicense()
Reset the license. Use this method to reset license in component.
License license = new License(); license.resetLicense();
resetLicense in interface ILicensepublic final boolean isLicensed()
ILicenseCheck if licence is applied to component
isLicensed in interface ILicenseCopyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.