public 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()
Deprecated.
|
void |
resetLicense()
Reset the license
Use this method to reset license in component
|
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 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 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 java.lang.String getVersion()
public void resetLicense()
License license = new License();
license.resetLicense();
resetLicense in interface ILicense@Deprecated public boolean isLicensed()
ILicenseCheck if licence is applied to component
isLicensed in interface ILicenseTrue if component is licensed, otherwise false