public abstract class URLTask extends java.lang.Object implements IntentTask
Task.TaskListener
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_BUFFER |
protected static int |
DEFAULT_TIMEOUT |
static java.lang.String |
EXTRA_URL |
static java.lang.String |
INTENT_COMPLETE |
static boolean |
LOG_ENABLED |
protected byte[] |
mBuffer |
protected int |
mBufferSize |
protected int |
mContentLength |
protected boolean |
mGzipEnabled |
protected int |
mTotalBytesLoaded |
protected java.lang.String |
mURL |
Constructor and Description |
---|
URLTask(java.lang.String url) |
URLTask(java.lang.String url,
int bufferSize) |
Modifier and Type | Method and Description |
---|---|
Intent |
getCompleteIntent() |
java.lang.String |
getURL() |
boolean |
isGzipEnabled() |
protected abstract void |
onProgress(byte[] data,
int count)
Internal callback when progressing
|
protected boolean |
openURL() |
protected boolean |
openURL(java.util.Map<java.lang.String,java.lang.String> properties) |
protected boolean |
postURL(java.lang.String data,
java.util.Map<java.lang.String,java.lang.String> properties)
Deprecated.
|
protected int |
readStream(java.io.InputStream stream) |
void |
setGzipEnabled(boolean gzipEnabled) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSucceeded, reset, run
public static boolean LOG_ENABLED
protected static final int DEFAULT_BUFFER
protected static final int DEFAULT_TIMEOUT
public static final java.lang.String INTENT_COMPLETE
public static java.lang.String EXTRA_URL
protected int mBufferSize
protected byte[] mBuffer
protected final java.lang.String mURL
protected int mContentLength
protected int mTotalBytesLoaded
protected boolean mGzipEnabled
public URLTask(java.lang.String url)
public URLTask(java.lang.String url, int bufferSize)
public boolean isGzipEnabled()
public void setGzipEnabled(boolean gzipEnabled)
public java.lang.String getURL()
protected boolean openURL()
protected boolean openURL(java.util.Map<java.lang.String,java.lang.String> properties)
protected int readStream(java.io.InputStream stream) throws java.lang.Exception
java.lang.Exception
@Deprecated protected boolean postURL(java.lang.String data, java.util.Map<java.lang.String,java.lang.String> properties)
protected abstract void onProgress(byte[] data, int count) throws java.lang.Exception
data
- count
- java.lang.Exception
public Intent getCompleteIntent()
getCompleteIntent
in interface IntentTask