public class DependencyManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
DependencyManager.DownloadFuture |
Constructor and Description |
---|
DependencyManager() |
Modifier and Type | Method and Description |
---|---|
static boolean |
downloadFile(java.lang.String url,
java.lang.String downloadPath,
FileType fileToDownload)
Method to download a file of the given file type
|
static java.util.concurrent.Future<java.lang.Boolean> |
downloadFileAsync(java.lang.String url,
java.lang.String downloadPath,
FileType fileToDownload)
An asynchronous method to download a file of the given file type
|
static void |
loadLibrary(java.io.File file)
Attempts to load the specified library (must be a proper java archive!)
|
static void |
registerDownloadProvider(IDownloadProvider provider)
Register a download provider, note: the earlier the registration, the higher priority it has
|
public static void registerDownloadProvider(IDownloadProvider provider)
provider
- The download providerpublic static void loadLibrary(java.io.File file) throws java.net.MalformedURLException
file
- The file representing the libraryjava.net.MalformedURLException
public static boolean downloadFile(java.lang.String url, java.lang.String downloadPath, FileType fileToDownload) throws NoProviderFoundException
url
- URL to download the file fromdownloadPath
- Path to download the file tofileToDownload
- File type of the downlaodNoProviderFoundException
public static java.util.concurrent.Future<java.lang.Boolean> downloadFileAsync(java.lang.String url, java.lang.String downloadPath, FileType fileToDownload) throws NoProviderFoundException
url
- URL to download the file fromdownloadPath
- Path to download the file tofileToDownload
- File type of the downlaodNoProviderFoundException