public class Resources extends Object
| Constructor and Description |
|---|
Resources() |
| Modifier and Type | Method and Description |
|---|---|
static void |
AllowAutomaticDownloads(Boolean allow)
Allow (true) or block (false) automatic downloading of required resources from the online repository.
|
static void |
FetchAll()
Download all compatible resources from the online repository.
|
static void |
FetchResource(String name)
Download the resource specified in the `name` parameter from the online repository.
|
static void |
FetchResources(String[] names)
Download the resources specified in the `names` parameter from the online repository.
|
static String |
GetLocalPath()
Return the full path to the directory where the resources will be downloaded.
|
static String |
GetRepository()
Return the URL of the online repository from which Aspose.OCR resources are downloaded.
|
static List<String> |
ListLocal()
List all Aspose.OCR resources stored in the local directory.
|
static List<String> |
ListRemote()
List all compatible resources from the online repository.
|
static void |
ReleaseMemory()
Unload OCR modules to free up memory.
|
static void |
RemoveLocal(String name)
Removes the locally stored Aspose.OCR resource.
|
static void |
SetLocalPath(String path)
Specify an absolute or relative path to the directory where the resources will be downloaded.
|
static void |
SetLocalPath(String path,
Boolean create)
Specify an absolute or relative path to the directory where the resources will be downloaded.
|
static void |
SetRepository(String url)
Specify the URL of the online repository from which Aspose.OCR resources will be downloaded.
|
public static void SetRepository(String url)
url - URL of the online repository.public static String GetRepository()
public static List<String> ListRemote() throws AsposeOCRException
AsposeOCRException - if download error.public static void SetLocalPath(String path)
path - Absolute or relative path to the directory.public static void SetLocalPath(String path, Boolean create) throws AsposeOCRException
path - Absolute or relative path to the directory.create - Parameter to prevent the directory from being created automatically.AsposeOCRException - if file not found, resource not found or recognition error.public static String GetLocalPath() throws AsposeOCRException
AsposeOCRException - if file not found, resource not found or recognition error.public static List<String> ListLocal() throws AsposeOCRException
AsposeOCRException - if file not found, resource not found or recognition error.public static void AllowAutomaticDownloads(Boolean allow)
allow - Boolean value to allow or block automatic downloading of required resources.public static void FetchResources(String[] names) throws AsposeOCRException
names - Array with resources names. See the ListRemote method.AsposeOCRException - if file not found, resource not found or recognition error.public static void FetchResource(String name) throws AsposeOCRException
name - String with resource name. See the ListRemote method.AsposeOCRException - if file not found, resource not found or recognition error.public static void FetchAll()
throws AsposeOCRException
AsposeOCRException - if file not found, resource not found or recognition error.public static void RemoveLocal(String name) throws AsposeOCRException, IOException
name - String with resource name. See the ListRemote method.AsposeOCRException - if file not found, resource not found or recognition error.IOException - if directory with resources not found.public static void ReleaseMemory()
Copyright © 2025 Aspose. All rights reserved.