com.tecit.jni.barcode
Class License

java.lang.Object
  extended by com.tecit.jni.barcode.License

public class License
extends java.lang.Object

Read the content of a license file

This utility class helps to read the license stored in a file: a tipical use is

 TBarCode tbc = TBarCode.create();
 tbc.licenseMe(new LicenseFile("/usr/local/share/tbarcode11/license.ini"));
 


Constructor Summary
License()
          Constructor
License(java.io.File file)
          Constructor with the file contains the license data
License(java.lang.String fileName)
          Constructor with the file name contains the license data
 
Method Summary
 java.lang.String getKey()
          Returns the license key
 int getKind()
          Returns the kind of license
 java.lang.String getLicensee()
          Returns the name of the licensee
 int getLicenses()
          Returns the number of licenses
 int getProduct()
          Returns the product variant (1D or 2D)
 void load(java.io.File file)
          Loads the file contains the license data
 void load(java.io.InputStream is)
          Loads the file contains the license data
 void load(java.lang.String fileName)
          Loads the file contains the license data
 void setKey(java.lang.String sKey)
          Sets the license key
 void setKind(int nKind)
          Sets the kind of license
 void setLicensee(java.lang.String sLicensee)
          Sets the name of the licensee
 void setLicenses(int nLicenses)
          Sets the number of licenses
 void setProduct(int nProduct)
          Sets the product variant (1D or 2D)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

License

public License()
Constructor


License

public License(java.lang.String fileName)
        throws java.lang.Exception
Constructor with the file name contains the license data

Throws:
java.lang.Exception

License

public License(java.io.File file)
        throws java.lang.Exception
Constructor with the file contains the license data

Throws:
java.lang.Exception
Method Detail

load

public void load(java.lang.String fileName)
          throws java.lang.Exception
Loads the file contains the license data

Throws:
java.lang.Exception

load

public void load(java.io.File file)
          throws java.lang.Exception
Loads the file contains the license data

Throws:
java.lang.Exception

load

public void load(java.io.InputStream is)
          throws java.lang.Exception
Loads the file contains the license data

Throws:
java.lang.Exception

getLicensee

public java.lang.String getLicensee()
Returns the name of the licensee


setLicensee

public void setLicensee(java.lang.String sLicensee)
Sets the name of the licensee


getKind

public int getKind()
Returns the kind of license

See Also:
LicenseKind

setKind

public void setKind(int nKind)
Sets the kind of license

See Also:
LicenseKind

getLicenses

public int getLicenses()
Returns the number of licenses


setLicenses

public void setLicenses(int nLicenses)
Sets the number of licenses


getKey

public java.lang.String getKey()
Returns the license key


setKey

public void setKey(java.lang.String sKey)
Sets the license key


getProduct

public int getProduct()
Returns the product variant (1D or 2D)

See Also:
LicenseProduct

setProduct

public void setProduct(int nProduct)
                throws java.lang.Exception
Sets the product variant (1D or 2D)

To be able to use DataMatrix, 2D is required here

Throws:
java.lang.Exception
See Also:
LicenseProduct