Class Downloader
java.lang.Object
me.hsgamer.hscore.downloader.core.Downloader
The downloader
-
Constructor Summary
ConstructorDescriptionDownloader
(DownloadInfoLoader downloadInfoLoader, InputStreamLoader inputStreamLoader, File folder) Create a new downloader -
Method Summary
Modifier and TypeMethodDescriptiongetDownloadInfo
(String name) Get the download infoGet the download info loaderGet the folderGet the input stream loaderGet the loaded download infosboolean
isLoaded()
Check if the downloader finished loading the download infosvoid
onLoaded()
Call when the downloader is finished loading the download infosvoid
setup()
Set up the downloader
-
Constructor Details
-
Downloader
public Downloader(DownloadInfoLoader downloadInfoLoader, InputStreamLoader inputStreamLoader, File folder) Create a new downloader- Parameters:
downloadInfoLoader
- the loaderfolder
- the folder to save downloaded files
-
-
Method Details
-
getFolder
Get the folder- Returns:
- the folder
-
getDownloadInfoLoader
Get the download info loader- Returns:
- the download info loader
-
getInputStreamLoader
Get the input stream loader- Returns:
- the input stream loader
-
getDownloadInfo
Get the download info- Parameters:
name
- the name- Returns:
- the download info
-
getLoadedDownloadInfo
Get the loaded download infos- Returns:
- the loaded download infos
-
isLoaded
public boolean isLoaded()Check if the downloader finished loading the download infos- Returns:
- true if it did
-
setup
public void setup()Set up the downloader -
onLoaded
public void onLoaded()Call when the downloader is finished loading the download infos
-