net.jini.url.httpmd
Class DelegatingHttpURLConnection
java.lang.Object
java.net.URLConnection
java.net.HttpURLConnection
net.jini.url.httpmd.DelegatingHttpURLConnection
- Direct Known Subclasses:
- HttpmdURLConnection
class DelegatingHttpURLConnection
- extends HttpURLConnection
An HTTP URL connection that delegates all operations defined by
HttpURLConnection and URLConnection.
- Author:
- Sun Microsystems, Inc.
Fields inherited from class java.net.HttpURLConnection |
chunkLength, fixedContentLength, 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 |
Constructor Summary |
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. |
Methods inherited from class java.net.URLConnection |
getConnectTimeout, getDefaultAllowUserInteraction, getDefaultRequestProperty, getFileNameMap, getReadTimeout, guessContentTypeFromName, guessContentTypeFromStream, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setFileNameMap, setReadTimeout, toString |
delegateConnection
HttpURLConnection delegateConnection
- The HTTP URL connection to which operations should be delegated.
DelegatingHttpURLConnection
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.
setInstanceFollowRedirects
public void setInstanceFollowRedirects(boolean followRedirects)
- Overrides:
setInstanceFollowRedirects
in class HttpURLConnection
getInstanceFollowRedirects
public boolean getInstanceFollowRedirects()
- Overrides:
getInstanceFollowRedirects
in class HttpURLConnection
setRequestMethod
public void setRequestMethod(String method)
throws ProtocolException
- Overrides:
setRequestMethod
in class HttpURLConnection
- Throws:
ProtocolException
getRequestMethod
public String getRequestMethod()
- Overrides:
getRequestMethod
in class HttpURLConnection
getResponseCode
public int getResponseCode()
throws IOException
- Overrides:
getResponseCode
in class HttpURLConnection
- Throws:
IOException
getResponseMessage
public String getResponseMessage()
throws IOException
- Overrides:
getResponseMessage
in class HttpURLConnection
- Throws:
IOException
disconnect
public void disconnect()
- Specified by:
disconnect
in class HttpURLConnection
usingProxy
public boolean usingProxy()
- Specified by:
usingProxy
in class HttpURLConnection
getErrorStream
public InputStream getErrorStream()
- Overrides:
getErrorStream
in class HttpURLConnection
connect
public void connect()
throws IOException
- Specified by:
connect
in class URLConnection
- Throws:
IOException
getURL
public URL getURL()
- Overrides:
getURL
in class URLConnection
getContentLength
public int getContentLength()
- Overrides:
getContentLength
in class URLConnection
getContentType
public String getContentType()
- Overrides:
getContentType
in class URLConnection
getContentEncoding
public String getContentEncoding()
- Overrides:
getContentEncoding
in class URLConnection
getExpiration
public long getExpiration()
- Overrides:
getExpiration
in class URLConnection
getDate
public long getDate()
- Overrides:
getDate
in class URLConnection
getLastModified
public long getLastModified()
- Overrides:
getLastModified
in class URLConnection
getHeaderField
public String getHeaderField(String name)
- Overrides:
getHeaderField
in class URLConnection
getHeaderFields
public Map getHeaderFields()
- Overrides:
getHeaderFields
in class URLConnection
getHeaderFieldInt
public int getHeaderFieldInt(String name,
int Default)
- Overrides:
getHeaderFieldInt
in class URLConnection
getHeaderFieldDate
public long getHeaderFieldDate(String name,
long Default)
- Overrides:
getHeaderFieldDate
in class HttpURLConnection
getHeaderFieldKey
public String getHeaderFieldKey(int n)
- Overrides:
getHeaderFieldKey
in class HttpURLConnection
getHeaderField
public String getHeaderField(int n)
- Overrides:
getHeaderField
in class HttpURLConnection
getContent
public Object getContent()
throws IOException
- Overrides:
getContent
in class URLConnection
- Throws:
IOException
getContent
public Object getContent(Class[] classes)
throws IOException
- Overrides:
getContent
in class URLConnection
- Throws:
IOException
getPermission
public Permission getPermission()
throws IOException
- Overrides:
getPermission
in class HttpURLConnection
- Throws:
IOException
getInputStream
public InputStream getInputStream()
throws IOException
- Overrides:
getInputStream
in class URLConnection
- Throws:
IOException
getOutputStream
public OutputStream getOutputStream()
throws IOException
- Overrides:
getOutputStream
in class URLConnection
- Throws:
IOException
setDoInput
public void setDoInput(boolean doinput)
- Overrides:
setDoInput
in class URLConnection
getDoInput
public boolean getDoInput()
- Overrides:
getDoInput
in class URLConnection
setDoOutput
public void setDoOutput(boolean dooutput)
- Overrides:
setDoOutput
in class URLConnection
getDoOutput
public boolean getDoOutput()
- Overrides:
getDoOutput
in class URLConnection
setAllowUserInteraction
public void setAllowUserInteraction(boolean allowuserinteraction)
- Overrides:
setAllowUserInteraction
in class URLConnection
getAllowUserInteraction
public boolean getAllowUserInteraction()
- Overrides:
getAllowUserInteraction
in class URLConnection
setUseCaches
public void setUseCaches(boolean usecaches)
- Overrides:
setUseCaches
in class URLConnection
getUseCaches
public boolean getUseCaches()
- Overrides:
getUseCaches
in class URLConnection
setIfModifiedSince
public void setIfModifiedSince(long ifmodifiedsince)
- Overrides:
setIfModifiedSince
in class URLConnection
getIfModifiedSince
public long getIfModifiedSince()
- Overrides:
getIfModifiedSince
in class URLConnection
getDefaultUseCaches
public boolean getDefaultUseCaches()
- Overrides:
getDefaultUseCaches
in class URLConnection
setDefaultUseCaches
public void setDefaultUseCaches(boolean defaultusecaches)
- Overrides:
setDefaultUseCaches
in class URLConnection
setRequestProperty
public void setRequestProperty(String key,
String value)
- Overrides:
setRequestProperty
in class URLConnection
addRequestProperty
public void addRequestProperty(String key,
String value)
- Overrides:
addRequestProperty
in class URLConnection
getRequestProperty
public String getRequestProperty(String key)
- Overrides:
getRequestProperty
in class URLConnection
getRequestProperties
public Map getRequestProperties()
- Overrides:
getRequestProperties
in class URLConnection
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.