public class URLDownloader extends Object
| Constructor and Description |
|---|
URLDownloader(String url)
URLDownloader
|
URLDownloader(String url,
String userAgent) |
URLDownloader(String method,
String url,
String userAgent) |
URLDownloader(String method,
String url,
String userAgent,
long timeout,
long maxSize) |
| Modifier and Type | Method and Description |
|---|---|
DownloadResult |
download()
Makes connection with the webserver, and download the content.
|
String |
getContent()
get the html content of the webpage
|
String |
getContentType() |
List<String> |
getExtraRequestHeaders() |
byte[] |
getRawContent() |
ArrayList<String> |
getRedirectedURLs() |
String |
getResponseHeader(String name) |
String[] |
getResponseHeaders() |
Map<String,String> |
getSavedCookies() |
int |
getStatus() |
long |
getTotalBytesDownloaded() |
String |
getURL()
Returns the url passed in the constructor, without the http://
|
void |
setForwardingIP(String ip) |
void |
setPostData(String postData) |
public URLDownloader(String url)
url - the url to be downloadedpublic void setPostData(String postData)
public DownloadResult download()
public int getStatus()
public String getContent()
public String getURL()
public String getContentType()
public long getTotalBytesDownloaded()
public byte[] getRawContent()
public String[] getResponseHeaders()
public void setForwardingIP(String ip)
Copyright © 2015. All rights reserved.