public class License
extends java.lang.Object
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 and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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)
|
public License()
public License(java.lang.String fileName) throws java.lang.Exception
java.lang.Exception
public License(java.io.File file) throws java.lang.Exception
java.lang.Exception
public void load(java.lang.String fileName) throws java.lang.Exception
java.lang.Exception
public void load(java.io.File file) throws java.lang.Exception
java.lang.Exception
public void load(java.io.InputStream is) throws java.lang.Exception
java.lang.Exception
public java.lang.String getLicensee()
public void setLicensee(java.lang.String sLicensee)
public int getKind()
LicenseKind
public void setKind(int nKind)
LicenseKind
public int getLicenses()
public void setLicenses(int nLicenses)
public java.lang.String getKey()
public void setKey(java.lang.String sKey)
public int getProduct()
LicenseProduct
public void setProduct(int nProduct) throws java.lang.Exception
To be able to use DataMatrix, 2D is required here
java.lang.Exception
LicenseProduct