|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.license.License
public final class License
This is the license management system. To use this library in the client program, you need a valid license. Before any API calls to this library, the client program needs to specify the license by either:
DEFAULT_LICENSE_FILES under the same directory as the suanshu
library jar file, runtime working directory, or classpath; or
setLicenseFile(java.io.File) to specify the license file; or
setLicenseKey(java.lang.String) to set the license key.
By default, the license file is assumed to be
located under the same directory as the suanshu library jar file, runtime
working directory, or classpath. If the license file is moved to
elsewhere, the client program can specify the new location by calling
setLicenseFile(java.io.File).
Another way to set the license programmatically is to call
setLicenseKey(java.lang.String) with the key string. Once you got a
valid license, you can copy the license key in the license file.
Using setLicenseKey(java.lang.String), the file I/O for loading
license file can be avoided.
| Field Summary | |
|---|---|
static java.lang.String[] |
DEFAULT_LICENSE_FILES
Default license files |
static java.lang.String |
LICENSE_FILE_PROPERTY
The system property name for setting license file. |
| Method Summary | |
|---|---|
static java.lang.String |
getLicenseKey()
Get the license key string of the current license. |
static void |
setLicenseFile(java.io.File licenseFile)
Override the default license file. |
static void |
setLicenseKey(java.lang.String key)
Set the license key for this invocation. |
static java.lang.String |
version()
Get the version number. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LICENSE_FILE_PROPERTY
setLicenseFile(java.io.File), license file can be specified by
system property using -D option in 'java' command.
public static final java.lang.String[] DEFAULT_LICENSE_FILES
| Method Detail |
|---|
public static void setLicenseFile(java.io.File licenseFile)
throws java.io.IOException
A license file can only be set once. All subsequent calls will lead to
RuntimeException.
licenseFile - the license file
java.io.IOException - if error has occurred when loading the license filepublic static void setLicenseKey(java.lang.String key)
A license key can only be set once. All subsequent calls will lead to
RuntimeException.
key - the license keypublic static java.lang.String version()
<major version>.<minor version>.<bugfix version>
public static java.lang.String getLicenseKey()
setLicenseKey(java.lang.String) for setting up
license programmatically without file I/O.
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||