public class DefaultDownloader extends Downloader
| Constructor and Description |
|---|
DefaultDownloader(Context context) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
clearCache()
Clears the
Downloader cache. |
java.lang.String |
execute(Request request)
Executes the specified request and returns the response String.
|
java.lang.String |
toSafeUrl(Request request)
Parses a request into a safe URL to be used for caching/tracking purposes.
|
java.lang.String |
toUrl(Request request)
Parses a request into a URL to be used for execution.
|
attachInstancepublic boolean clearCache()
DownloaderDownloader cache.clearCache in class Downloadertrue if successful, false if otherwise.public java.lang.String execute(Request request) throws java.lang.IllegalArgumentException, java.io.IOException
Downloaderexecute in class Downloaderrequest - PkRSS Request object containing all necessary parameters.java.lang.IllegalArgumentExceptionjava.io.IOExceptionpublic java.lang.String toSafeUrl(Request request)
DownloaderNote: Returning an invalid URL may cause caching errors and mishandled memory.
toSafeUrl in class Downloaderrequest - PkRSS Request object containing all necessary parameters.public java.lang.String toUrl(Request request)
DownloadertoUrl in class Downloaderrequest - PkRSS Request object containing all necessary parameters.