|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectzeroslackr.installer.Downloader
public abstract class Downloader
Abstract Downloader Class.
Methods for downloading files.
Licensed under GNU GPL (Version 3).
Sources: Java's URL class API
| Constructor Summary | |
|---|---|
Downloader()
|
|
| Method Summary | |
|---|---|
static void |
download(String url,
String dest)
Download a file to a location. |
static String |
getBaseName(String file)
Get the basename of a file (ie without the extension). |
static String |
getFileName(String url)
Get file name in URL. |
static String |
getMd5(String file)
Calculates the Md5 hash of a target file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Downloader()
| Method Detail |
|---|
public static void download(String url,
String dest)
throws MalformedURLException,
IOException
url - String representing URL to download from.dest - Destination to download to.
MalformedURLException
IOExceptionpublic static String getFileName(String url)
url - String representing URL to check.
public static String getBaseName(String file)
file - String representing URL to check.
public static String getMd5(String file)
throws FileNotFoundException,
IOException
file - String of path to file.
FileNotFoundException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||