public class DownloadConnectionAdapter
extends java.lang.Object
implements com.liulishuo.okdownload.core.connection.DownloadConnection, com.liulishuo.okdownload.core.connection.DownloadConnection.Connected
| Modifier and Type | Class and Description |
|---|---|
static class |
DownloadConnectionAdapter.Factory |
| Constructor and Description |
|---|
DownloadConnectionAdapter(FileDownloadConnection fileDownloadConnection,
com.liulishuo.okdownload.IRedirectHandler redirectHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(java.lang.String name,
java.lang.String value) |
com.liulishuo.okdownload.core.connection.DownloadConnection.Connected |
execute() |
java.io.InputStream |
getInputStream() |
java.lang.String |
getRedirectLocation() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getRequestProperties() |
java.lang.String |
getRequestProperty(java.lang.String key)
FileDownloadConnection don't support this method. |
int |
getResponseCode() |
java.lang.String |
getResponseHeaderField(java.lang.String name) |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getResponseHeaderFields() |
void |
release() |
boolean |
setRequestMethod(java.lang.String method) |
public DownloadConnectionAdapter(@NonNull
FileDownloadConnection fileDownloadConnection,
@NonNull
com.liulishuo.okdownload.IRedirectHandler redirectHandler)
public void addHeader(java.lang.String name,
java.lang.String value)
addHeader in interface com.liulishuo.okdownload.core.connection.DownloadConnectionpublic boolean setRequestMethod(@NonNull
java.lang.String method)
throws java.net.ProtocolException
setRequestMethod in interface com.liulishuo.okdownload.core.connection.DownloadConnectionjava.net.ProtocolExceptionpublic com.liulishuo.okdownload.core.connection.DownloadConnection.Connected execute()
throws java.io.IOException
execute in interface com.liulishuo.okdownload.core.connection.DownloadConnectionjava.io.IOExceptionpublic void release()
release in interface com.liulishuo.okdownload.core.connection.DownloadConnectionpublic java.util.Map<java.lang.String,java.util.List<java.lang.String>> getRequestProperties()
getRequestProperties in interface com.liulishuo.okdownload.core.connection.DownloadConnectionpublic java.lang.String getRequestProperty(java.lang.String key)
FileDownloadConnection don't support this method.getRequestProperty in interface com.liulishuo.okdownload.core.connection.DownloadConnectionkey - property keypublic int getResponseCode()
throws java.io.IOException
getResponseCode in interface com.liulishuo.okdownload.core.connection.DownloadConnection.Connectedjava.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface com.liulishuo.okdownload.core.connection.DownloadConnection.Connectedjava.io.IOException@Nullable public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getResponseHeaderFields()
getResponseHeaderFields in interface com.liulishuo.okdownload.core.connection.DownloadConnection.Connected@Nullable public java.lang.String getResponseHeaderField(java.lang.String name)
getResponseHeaderField in interface com.liulishuo.okdownload.core.connection.DownloadConnection.Connectedpublic java.lang.String getRedirectLocation()
getRedirectLocation in interface com.liulishuo.okdownload.core.connection.DownloadConnection.Connected