public class DownloadInfo extends URLInfo
| Modifier and Type | Class and Description |
|---|---|
static class |
DownloadInfo.Part |
URLInfo.States| Modifier and Type | Field and Description |
|---|---|
static long |
PART_LENGTH |
CONNECT_TIMEOUT, READ_TIMEOUTUSER_AGENT| Constructor and Description |
|---|
DownloadInfo(URL source) |
DownloadInfo(URL source,
ProxyInfo p) |
| Modifier and Type | Method and Description |
|---|---|
void |
calculate()
for multi part download, call every time when we need to know total download progress
|
void |
copy(DownloadInfo oldSource)
copy resume data from oldSource;
|
void |
enableMultipart() |
void |
enableMultipart(long partLength) |
void |
extract(AtomicBoolean stop,
Runnable notify) |
long |
getCount() |
long |
getPartLength() |
List<DownloadInfo.Part> |
getParts() |
boolean |
multipart()
is it a multipart download?
|
void |
reset() |
boolean |
resume(DownloadInfo newSource)
Check if we can continue download a file from new source.
|
void |
setCount(long count) |
empty, extract, extractNormal, extractRange, getContentFilename, getContentType, getCookie, getDelay, getException, getLength, getProxy, getRange, getRetry, getSource, getState, openConnection, setContentFilename, setContentType, setCookie, setDelay, setEmpty, setException, setLength, setProxy, setRange, setRetry, setState, setStategetReferer, getUserAgent, setReferer, setUserAgentpublic DownloadInfo(URL source)
public boolean multipart()
public void reset()
public void calculate()
public List<DownloadInfo.Part> getParts()
public long getPartLength()
public void enableMultipart()
public void enableMultipart(long partLength)
public boolean resume(DownloadInfo newSource)
newSource - new sourcepublic void copy(DownloadInfo oldSource)
public long getCount()
public void setCount(long count)
public void extract(AtomicBoolean stop, Runnable notify)
Copyright © 2016. All rights reserved.