class DelegatingHttpURLConnection extends HttpURLConnection
| Modifier and Type | Field and Description |
|---|---|
(package private) HttpURLConnection |
delegateConnection
The HTTP URL connection to which operations should be delegated.
|
chunkLength, fixedContentLength, fixedContentLengthLong, HTTP_ACCEPTED, HTTP_BAD_GATEWAY, HTTP_BAD_METHOD, HTTP_BAD_REQUEST, HTTP_CLIENT_TIMEOUT, HTTP_CONFLICT, HTTP_CREATED, HTTP_ENTITY_TOO_LARGE, HTTP_FORBIDDEN, HTTP_GATEWAY_TIMEOUT, HTTP_GONE, HTTP_INTERNAL_ERROR, HTTP_LENGTH_REQUIRED, HTTP_MOVED_PERM, HTTP_MOVED_TEMP, HTTP_MULT_CHOICE, HTTP_NO_CONTENT, HTTP_NOT_ACCEPTABLE, HTTP_NOT_AUTHORITATIVE, HTTP_NOT_FOUND, HTTP_NOT_IMPLEMENTED, HTTP_NOT_MODIFIED, HTTP_OK, HTTP_PARTIAL, HTTP_PAYMENT_REQUIRED, HTTP_PRECON_FAILED, HTTP_PROXY_AUTH, HTTP_REQ_TOO_LONG, HTTP_RESET, HTTP_SEE_OTHER, HTTP_SERVER_ERROR, HTTP_UNAUTHORIZED, HTTP_UNAVAILABLE, HTTP_UNSUPPORTED_TYPE, HTTP_USE_PROXY, HTTP_VERSION, instanceFollowRedirects, method, responseCode, responseMessageallowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches| Constructor and Description |
|---|
DelegatingHttpURLConnection(URL url)
Creates an HttpURLConnection for the specified URL that delegates all
operations to the value of the delegateConnection field, which should be
set separately.
|
getFollowRedirects, setChunkedStreamingMode, setFixedLengthStreamingMode, setFixedLengthStreamingMode, setFollowRedirectsgetConnectTimeout, getContentLengthLong, getDefaultAllowUserInteraction, getDefaultRequestProperty, getFileNameMap, getHeaderFieldLong, getReadTimeout, guessContentTypeFromName, guessContentTypeFromStream, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setFileNameMap, setReadTimeout, toStringHttpURLConnection delegateConnection
DelegatingHttpURLConnection(URL url)
public void setInstanceFollowRedirects(boolean followRedirects)
setInstanceFollowRedirects in class HttpURLConnectionpublic boolean getInstanceFollowRedirects()
getInstanceFollowRedirects in class HttpURLConnectionpublic void setRequestMethod(String method) throws ProtocolException
setRequestMethod in class HttpURLConnectionProtocolExceptionpublic String getRequestMethod()
getRequestMethod in class HttpURLConnectionpublic int getResponseCode()
throws IOException
getResponseCode in class HttpURLConnectionIOExceptionpublic String getResponseMessage() throws IOException
getResponseMessage in class HttpURLConnectionIOExceptionpublic void disconnect()
disconnect in class HttpURLConnectionpublic boolean usingProxy()
usingProxy in class HttpURLConnectionpublic InputStream getErrorStream()
getErrorStream in class HttpURLConnectionpublic void connect()
throws IOException
connect in class URLConnectionIOExceptionpublic URL getURL()
getURL in class URLConnectionpublic int getContentLength()
getContentLength in class URLConnectionpublic String getContentType()
getContentType in class URLConnectionpublic String getContentEncoding()
getContentEncoding in class URLConnectionpublic long getExpiration()
getExpiration in class URLConnectionpublic long getDate()
getDate in class URLConnectionpublic long getLastModified()
getLastModified in class URLConnectionpublic String getHeaderField(String name)
getHeaderField in class URLConnectionpublic Map getHeaderFields()
getHeaderFields in class URLConnectionpublic int getHeaderFieldInt(String name, int Default)
getHeaderFieldInt in class URLConnectionpublic long getHeaderFieldDate(String name, long Default)
getHeaderFieldDate in class HttpURLConnectionpublic String getHeaderFieldKey(int n)
getHeaderFieldKey in class HttpURLConnectionpublic String getHeaderField(int n)
getHeaderField in class HttpURLConnectionpublic Object getContent() throws IOException
getContent in class URLConnectionIOExceptionpublic Object getContent(Class[] classes) throws IOException
getContent in class URLConnectionIOExceptionpublic Permission getPermission() throws IOException
getPermission in class HttpURLConnectionIOExceptionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in class URLConnectionIOExceptionpublic void setDoInput(boolean doinput)
setDoInput in class URLConnectionpublic boolean getDoInput()
getDoInput in class URLConnectionpublic void setDoOutput(boolean dooutput)
setDoOutput in class URLConnectionpublic boolean getDoOutput()
getDoOutput in class URLConnectionpublic void setAllowUserInteraction(boolean allowuserinteraction)
setAllowUserInteraction in class URLConnectionpublic boolean getAllowUserInteraction()
getAllowUserInteraction in class URLConnectionpublic void setUseCaches(boolean usecaches)
setUseCaches in class URLConnectionpublic boolean getUseCaches()
getUseCaches in class URLConnectionpublic void setIfModifiedSince(long ifmodifiedsince)
setIfModifiedSince in class URLConnectionpublic long getIfModifiedSince()
getIfModifiedSince in class URLConnectionpublic boolean getDefaultUseCaches()
getDefaultUseCaches in class URLConnectionpublic void setDefaultUseCaches(boolean defaultusecaches)
setDefaultUseCaches in class URLConnectionpublic void setRequestProperty(String key, String value)
setRequestProperty in class URLConnectionpublic void addRequestProperty(String key, String value)
addRequestProperty in class URLConnectionpublic String getRequestProperty(String key)
getRequestProperty in class URLConnectionpublic Map getRequestProperties()
getRequestProperties in class URLConnectionCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.