com.aspose.slides
Class License

java.lang.Object
  extended by com.aspose.slides.License
All Implemented Interfaces:
ILicense

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.


Constructor Summary
License()
          Initializes a new instance of this class.
 
Method Summary
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 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.

Method Detail

setLicense

public void setLicense(java.io.InputStream stream)
                throws AsposeLicenseException
Licenses the component.

Specified by:
setLicense in interface ILicense
Parameters:
stream - A stream that contains the license. Use null to switch to evaluation mode.
      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.
Throws:
AsposeLicenseException

setLicense

public void setLicense(java.lang.String namePath)
                throws AsposeLicenseException
Licenses the component.

Specified by:
setLicense in interface ILicense
Parameters:
namePath - Can be a full or short file name or name of an embedded resource. Use an empty string to switch to evaluation mode.
      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.
Throws:
AsposeLicenseException

getVersion

public static java.lang.String getVersion()
Returns version of Aspose.Slides for Java.


resetLicense

public void resetLicense()
Reset the license Use this method to reset license in component

Specified by:
resetLicense in interface ILicense

isLicensed

public boolean isLicensed()
Description copied from interface: ILicense

Check if licence is applied to component

Specified by:
isLicensed in interface ILicense
Returns:
True if component is licensed, otherwise false


Copyright © Copyright 2004-2016 Aspose Pty Ltd. All Rights Reserved.