License

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.slides.ILicense

public final class License 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");

Constructors

ConstructorDescription
License()Initializes a new instance of this class.

Methods

MethodDescription
setLicense(InputStream stream)Licenses the component.
setLicense(String namePath)Licenses the component.
getVersion()Returns version of Aspose.Slides for Java.
resetLicense()Reset the license Use this method to reset license in component
isLicensed()

License()

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");

setLicense(InputStream stream)

public final void setLicense(InputStream stream)

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");

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamA stream that contains the license. Use null to switch to evaluation mode.

setLicense(String namePath)

public final void setLicense(String namePath)

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");

Parameters:

ParameterTypeDescription
namePathjava.lang.StringCan be a full or short file name or name of an embedded resource. Use an empty string to switch to evaluation mode.

getVersion()

public static final String getVersion()

Returns version of Aspose.Slides for Java.

Returns: java.lang.String

resetLicense()

public final void resetLicense()

Reset the license Use this method to reset license in component

License license = new License();
 license.resetLicense();

isLicensed()

public final boolean isLicensed()

Check if licence is applied to component

Returns: boolean