public class InterceptingURLConnection extends HttpURLConnection
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 |
|---|
InterceptingURLConnection(HttpURLConnection interceptedUrlConnection) |
getFollowRedirects, setFollowRedirectspublic InterceptingURLConnection(HttpURLConnection interceptedUrlConnection)
public String getHeaderFieldKey(int n)
getHeaderFieldKey in class HttpURLConnectionpublic void setFixedLengthStreamingMode(int contentLength)
setFixedLengthStreamingMode in class HttpURLConnectionpublic void setFixedLengthStreamingMode(long contentLength)
setFixedLengthStreamingMode in class HttpURLConnectionpublic void setChunkedStreamingMode(int chunklen)
setChunkedStreamingMode in class HttpURLConnectionpublic String getHeaderField(int n)
getHeaderField in class HttpURLConnectionpublic 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 long getHeaderFieldDate(String name, long Default)
getHeaderFieldDate in class HttpURLConnectionpublic void disconnect()
disconnect in class HttpURLConnectionpublic boolean usingProxy()
usingProxy in class HttpURLConnectionpublic Permission getPermission() throws IOException
getPermission in class HttpURLConnectionIOExceptionpublic InputStream getErrorStream()
getErrorStream in class HttpURLConnectionpublic void connect()
throws IOException
connect in class URLConnectionIOExceptionpublic void setConnectTimeout(int timeout)
setConnectTimeout in class URLConnectionpublic int getConnectTimeout()
getConnectTimeout in class URLConnectionpublic void setReadTimeout(int timeout)
setReadTimeout in class URLConnectionpublic int getReadTimeout()
getReadTimeout in class URLConnectionpublic URL getURL()
getURL in class URLConnectionpublic int getContentLength()
getContentLength in class URLConnectionpublic long getContentLengthLong()
getContentLengthLong 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<String,List<String>> getHeaderFields()
getHeaderFields in class URLConnectionpublic int getHeaderFieldInt(String name, int defaultValue)
getHeaderFieldInt in class URLConnectionpublic long getHeaderFieldLong(String name, long defaultValue)
getHeaderFieldLong in class URLConnectionpublic Object getContent() throws IOException
getContent in class URLConnectionIOExceptionpublic Object getContent(Class[] classes) throws IOException
getContent in class URLConnectionIOExceptionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in class URLConnectionIOExceptionpublic String toString()
toString in class URLConnectionpublic 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<String,List<String>> getRequestProperties()
getRequestProperties in class URLConnectionpublic byte[] getResponseBody()
public byte[] getRequestBody()
Copyright © 2019. All rights reserved.