public final class License extends Object
Example usage:
// Set license from file
License license = new License();
license.setLicense("C:\\GroupDocs.Markdown.lic");
// Set license from static method
License.set("C:\\GroupDocs.Markdown.lic");
// Set license from stream
try (InputStream stream = new FileInputStream("C:\\GroupDocs.Markdown.lic")) {
license.setLicense(stream);
}
| Constructor and Description |
|---|
License()
Initializes a new instance of the
License class. |
| Modifier and Type | Method and Description |
|---|---|
static void |
set(InputStream stream)
Sets the license from a stream (static version).
|
static void |
set(String filePath)
Sets the license from a file path (static version).
|
void |
setLicense(InputStream stream)
Sets the license from a stream.
|
void |
setLicense(String filePath)
Sets the license from a file path.
|
public License()
License class.public void setLicense(String filePath) throws Exception
filePath - The path to the license file.IOException - if the file cannot be read.Exceptionpublic static void set(String filePath) throws IOException
filePath - The path to the license file.IOException - if the file cannot be read.public void setLicense(InputStream stream)
stream - The input stream containing the license.public static void set(InputStream stream)
stream - The input stream containing the license.Copyright © 2026. All rights reserved.