|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.repository.testframework.FakeDownloader
public class FakeDownloader
Fake implementation of Downloader that returns some specified content for specified
URLs.
| Constructor Summary | |
|---|---|
FakeDownloader()
|
|
| Method Summary | |
|---|---|
void |
dispose()
Close all input streams, since they will have been prevented from being closed by ReopeningInputStream. |
java.io.InputStream |
download(java.net.URL url,
SettingsController controller,
ProgressIndicator indicator)
Gets a stream associated with the content at the given URL. |
void |
registerUrl(java.net.URL url,
java.io.InputStream stream)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FakeDownloader()
| Method Detail |
|---|
public void registerUrl(java.net.URL url,
java.io.InputStream stream)
@NonNull
public java.io.InputStream download(@NonNull
java.net.URL url,
@NonNull
SettingsController controller,
@NonNull
ProgressIndicator indicator)
throws java.io.IOException
Downloader
download in interface Downloaderurl - The URL to fetch.controller - Settings (e.g. proxy configuration) for the connection.indicator - Facility for showing download progress and logging.
null if the
download is cancelled.
java.io.IOExceptionpublic void dispose()
ReopeningInputStream.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||