public class URLInfo extends BrowserInfo
| Modifier and Type | Class and Description |
|---|---|
static class |
URLInfo.States
Notify States
|
| Modifier and Type | Field and Description |
|---|---|
static int |
CONNECT_TIMEOUT
connect socket timeout
|
static int |
READ_TIMEOUT
read socket timeout
|
protected URL |
url
download url (if redirected/moved)
|
USER_AGENT| Modifier and Type | Method and Description |
|---|---|
boolean |
empty() |
void |
extract() |
void |
extract(AtomicBoolean stop,
Runnable notify) |
protected HttpURLConnection |
extractNormal() |
protected HttpURLConnection |
extractRange() |
String |
getContentFilename() |
String |
getContentType() |
String |
getCookie() |
int |
getDelay() |
Throwable |
getException() |
Long |
getLength() |
ProxyInfo |
getProxy() |
boolean |
getRange() |
int |
getRetry() |
URL |
getSource() |
URLInfo.States |
getState() |
HttpURLConnection |
openConnection() |
void |
resume(URLInfo old)
copy resume data from oldSource;
|
void |
setContentFilename(String f) |
void |
setContentType(String ct) |
void |
setCookie(String cookie) |
void |
setDelay(int delay,
Throwable e) |
void |
setEmpty(boolean b) |
protected void |
setException(Throwable exception) |
void |
setLength(Long l) |
void |
setProxy(ProxyInfo proxy) |
void |
setRange(boolean range) |
void |
setRetry(int retry) |
void |
setState(URLInfo.States state) |
void |
setState(URLInfo.States state,
Throwable e) |
getReferer, getUserAgent, resume, setReferer, setUserAgentpublic static int CONNECT_TIMEOUT
public static int READ_TIMEOUT
protected URL url
public URLInfo(URL source)
public HttpURLConnection openConnection() throws IOException
IOExceptionpublic void extract()
public void extract(AtomicBoolean stop, Runnable notify)
public boolean empty()
public void setEmpty(boolean b)
protected HttpURLConnection extractRange() throws IOException
IOExceptionprotected HttpURLConnection extractNormal() throws IOException
IOExceptionpublic String getContentType()
public void setContentType(String ct)
public Long getLength()
public void setLength(Long l)
public URL getSource()
public String getContentFilename()
public void setContentFilename(String f)
public URLInfo.States getState()
public void setState(URLInfo.States state)
public void setState(URLInfo.States state, Throwable e)
public Throwable getException()
protected void setException(Throwable exception)
public int getDelay()
public void setDelay(int delay,
Throwable e)
public boolean getRange()
public void setRange(boolean range)
public ProxyInfo getProxy()
public void setProxy(ProxyInfo proxy)
public String getCookie()
public void setCookie(String cookie)
public int getRetry()
public void setRetry(int retry)
public void resume(URLInfo old)
Copyright © 2017. All rights reserved.