public class DelegatingURLConnection extends URLConnection
Modifier and Type | Field and Description |
---|---|
protected URLConnection |
delegateConnection |
protected URL |
delegateUrl |
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
Constructor and Description |
---|
DelegatingURLConnection(URL url) |
addRequestProperty, getConnectTimeout, getContentLengthLong, getDefaultAllowUserInteraction, getDefaultRequestProperty, getFileNameMap, getHeaderFieldLong, getHeaderFields, getReadTimeout, getRequestProperties, guessContentTypeFromName, guessContentTypeFromStream, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setFileNameMap, setReadTimeout
protected URL delegateUrl
protected URLConnection delegateConnection
public DelegatingURLConnection(URL url) throws MalformedURLException, IOException
MalformedURLException
IOException
protected URL makeDelegateUrl(URL url) throws MalformedURLException, IOException
MalformedURLException
IOException
protected URLConnection makeDelegateUrlConnection(URL url) throws IOException
IOException
public void connect() throws IOException
connect
in class URLConnection
IOException
public URL getURL()
getURL
in class URLConnection
public int getContentLength()
getContentLength
in class URLConnection
public String getContentType()
getContentType
in class URLConnection
public String getContentEncoding()
getContentEncoding
in class URLConnection
public long getExpiration()
getExpiration
in class URLConnection
public long getDate()
getDate
in class URLConnection
public long getLastModified()
getLastModified
in class URLConnection
public String getHeaderField(String name)
getHeaderField
in class URLConnection
public int getHeaderFieldInt(String name, int _default)
getHeaderFieldInt
in class URLConnection
public long getHeaderFieldDate(String name, long _default)
getHeaderFieldDate
in class URLConnection
public String getHeaderFieldKey(int n)
getHeaderFieldKey
in class URLConnection
public String getHeaderField(int n)
getHeaderField
in class URLConnection
public Object getContent() throws IOException
getContent
in class URLConnection
IOException
public Object getContent(Class[] classes) throws IOException
getContent
in class URLConnection
IOException
public Permission getPermission() throws IOException
getPermission
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 String toString()
toString
in class URLConnection
public void setDoInput(boolean doinput)
setDoInput
in class URLConnection
public boolean getDoInput()
getDoInput
in class URLConnection
public void setDoOutput(boolean dooutput)
setDoOutput
in class URLConnection
public boolean getDoOutput()
getDoOutput
in class URLConnection
public void setAllowUserInteraction(boolean allowuserinteraction)
setAllowUserInteraction
in class URLConnection
public boolean getAllowUserInteraction()
getAllowUserInteraction
in class URLConnection
public void setUseCaches(boolean usecaches)
setUseCaches
in class URLConnection
public boolean getUseCaches()
getUseCaches
in class URLConnection
public void setIfModifiedSince(long ifmodifiedsince)
setIfModifiedSince
in class URLConnection
public long getIfModifiedSince()
getIfModifiedSince
in class URLConnection
public boolean getDefaultUseCaches()
getDefaultUseCaches
in class URLConnection
public void setDefaultUseCaches(boolean defaultusecaches)
setDefaultUseCaches
in class URLConnection
public void setRequestProperty(String key, String value)
setRequestProperty
in class URLConnection
public String getRequestProperty(String key)
getRequestProperty
in class URLConnection
Copyright © 2018 JBoss by Red Hat. All rights reserved.