| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmultipart.downloaders.CannedDownloaderStub
public class CannedDownloaderStub
Stubbed downloader for testing. Always returns a particular response, namely "--", regardless of the actual URL content.
| Constructor Summary | |
|---|---|
| CannedDownloaderStub()Creates a new instance of CannedDownloaderStub. | |
| Method Summary | |
|---|---|
|  void | download(java.lang.String url,
         java.io.OutputStream dest)Regardless of url, writes response to dest | 
|  java.lang.String | downloadAsString(java.lang.String url)Returns the contents of url as a String. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public CannedDownloaderStub()
| Method Detail | 
|---|
public void download(java.lang.String url,
                     java.io.OutputStream dest)
              throws java.io.IOException
download in interface IDownloaderurl - A string specifying the URL of the remote file to download.dest - The output destination for the downloaded data.
java.io.IOException - If the remote file cannot be downloaded.
java.net.MalformedURLException - If url is a malformed URL.public java.lang.String downloadAsString(java.lang.String url)
IDownloader
downloadAsString in interface IDownloaderurl - A string specifying the URL of the remote file to download.
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||