public class HttpURLConnectionWrapper 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| Modifier and Type | Method and Description |
|---|---|
void |
addRequestProperty(String key,
String value) |
void |
connect() |
void |
disconnect() |
String |
getContentType()
Fix missing content type
|
InputStream |
getErrorStream() |
String |
getHeaderField(int n) |
String |
getHeaderField(String name) |
Map<String,List<String>> |
getHeaderFields() |
InputStream |
getInputStream() |
boolean |
getInstanceFollowRedirects() |
OutputStream |
getOutputStream() |
String |
getRequestMethod() |
Map<String,List<String>> |
getRequestProperties() |
String |
getRequestProperty(String key) |
int |
getResponseCode() |
String |
getResponseMessage() |
void |
setDoOutput(boolean dooutput) |
void |
setInstanceFollowRedirects(boolean followRedirects) |
void |
setRequestMethod(String method) |
void |
setRequestProperty(String key,
String value) |
boolean |
usingProxy() |
getFollowRedirects, getHeaderFieldDate, getHeaderFieldKey, getPermission, setChunkedStreamingMode, setFixedLengthStreamingMode, setFixedLengthStreamingMode, setFollowRedirectsgetAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldInt, getHeaderFieldLong, getIfModifiedSince, getLastModified, getReadTimeout, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setFileNameMap, setIfModifiedSince, setReadTimeout, setUseCaches, toStringpublic void setRequestMethod(String method) throws ProtocolException
setRequestMethod in class HttpURLConnectionProtocolExceptionpublic void setInstanceFollowRedirects(boolean followRedirects)
setInstanceFollowRedirects in class HttpURLConnectionpublic boolean getInstanceFollowRedirects()
getInstanceFollowRedirects in class HttpURLConnectionpublic String getRequestMethod()
getRequestMethod in class HttpURLConnectionpublic int getResponseCode()
throws IOException
getResponseCode in class HttpURLConnectionIOExceptionpublic String getResponseMessage() throws IOException
getResponseMessage in class HttpURLConnectionIOExceptionpublic Map<String,List<String>> getHeaderFields()
getHeaderFields in class URLConnectionpublic String getHeaderField(String name)
getHeaderField in class URLConnectionpublic String getHeaderField(int n)
getHeaderField in class HttpURLConnectionpublic void disconnect()
disconnect in class HttpURLConnectionpublic void setDoOutput(boolean dooutput)
setDoOutput in class URLConnectionpublic boolean usingProxy()
usingProxy in class HttpURLConnectionpublic void connect()
throws IOException
connect in class URLConnectionIOExceptionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in class URLConnectionIOExceptionpublic InputStream getErrorStream()
getErrorStream in class HttpURLConnectionpublic void setRequestProperty(String key, String value)
setRequestProperty in class URLConnectionpublic void addRequestProperty(String key, String value)
addRequestProperty in class URLConnectionpublic Map<String,List<String>> getRequestProperties()
getRequestProperties in class URLConnectionpublic String getRequestProperty(String key)
getRequestProperty in class URLConnectionpublic String getContentType()
getContentType in class URLConnectionCopyright © 2001–2025 MickaĆ«l Guessant. All rights reserved.