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, responseMessage
allowUserInteraction, 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, setFollowRedirects
getAllowUserInteraction, 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, toString
public void setRequestMethod(String method) throws ProtocolException
setRequestMethod
in class HttpURLConnection
ProtocolException
public void setInstanceFollowRedirects(boolean followRedirects)
setInstanceFollowRedirects
in class HttpURLConnection
public boolean getInstanceFollowRedirects()
getInstanceFollowRedirects
in class HttpURLConnection
public String getRequestMethod()
getRequestMethod
in class HttpURLConnection
public int getResponseCode() throws IOException
getResponseCode
in class HttpURLConnection
IOException
public String getResponseMessage() throws IOException
getResponseMessage
in class HttpURLConnection
IOException
public Map<String,List<String>> getHeaderFields()
getHeaderFields
in class URLConnection
public String getHeaderField(String name)
getHeaderField
in class URLConnection
public String getHeaderField(int n)
getHeaderField
in class HttpURLConnection
public void disconnect()
disconnect
in class HttpURLConnection
public void setDoOutput(boolean dooutput)
setDoOutput
in class URLConnection
public boolean usingProxy()
usingProxy
in class HttpURLConnection
public void connect() throws IOException
connect
in class URLConnection
IOException
public InputStream getInputStream() throws IOException
getInputStream
in class URLConnection
IOException
public OutputStream getOutputStream() throws IOException
getOutputStream
in class URLConnection
IOException
public InputStream getErrorStream()
getErrorStream
in class HttpURLConnection
public void setRequestProperty(String key, String value)
setRequestProperty
in class URLConnection
public void addRequestProperty(String key, String value)
addRequestProperty
in class URLConnection
public Map<String,List<String>> getRequestProperties()
getRequestProperties
in class URLConnection
public String getRequestProperty(String key)
getRequestProperty
in class URLConnection
public String getContentType()
getContentType
in class URLConnection
Copyright © 2001–2024 MickaĆ«l Guessant. All rights reserved.