public class LicenseKey extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_VALIDATOR |
static SimpleDateFormat |
parserSDF
The format used for date Strings
|
Constructor and Description |
---|
LicenseKey() |
Modifier and Type | Method and Description |
---|---|
static String[] |
getLicenseeInfo()
Returns information about the Licensee.
|
static String[] |
getLicenseeInfoForVersion(String version)
Returns information about the Licensee.
|
static InputStream |
getResourceStream(String key)
Tries to get a resource as stream using different strategies.
|
static void |
loadLicenseFile(InputStream licenseIs)
Loads a license file using an InputStream.
|
static void |
loadLicenseFile(InputStream[] licenseIs)
Loads a license files using InputStreams.
|
static void |
loadLicenseFile(String pathToLicFile)
Loads a license file from a path.
|
static void |
loadLicenseFile(String[] files)
Loads license files.
|
static void |
scheduledCheck(LicenseKeyProduct product)
Performs a scheduled license check in a given time interval (LicenseKey.CHECK_INTERVAL)
|
public static final String DEFAULT_VALIDATOR
public static final SimpleDateFormat parserSDF
public static void loadLicenseFile(InputStream licenseIs) throws LicenseKeyException
licenseIs
- the input stream for reading the license fileLicenseKeyException
- thrown if there's a problem with the license keypublic static void loadLicenseFile(InputStream[] licenseIs) throws LicenseKeyException
licenseIs
- the input streams for reading the license filesLicenseKeyException
- thrown if there's a problem with the license keypublic static void loadLicenseFile(String pathToLicFile) throws LicenseKeyException
pathToLicFile
- the path to the license fileLicenseKeyException
- thrown if there's a problem with the license keypublic static void loadLicenseFile(String[] files) throws LicenseKeyException
files
- the path to the license filesLicenseKeyException
- thrown if there's a problem with the license keypublic static InputStream getResourceStream(String key)
key
- the path to the resourcepublic static String[] getLicenseeInfo() throws LicenseKeyException
LicenseKeyException
public static String[] getLicenseeInfoForVersion(String version) throws LicenseKeyException
LicenseKeyException
public static void scheduledCheck(LicenseKeyProduct product)
product
- Copyright © 2018. All rights reserved.