org.jboss.net.protocol
Class DelegatingURLConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by org.jboss.net.protocol.DelegatingURLConnection
Direct Known Subclasses:
ResourceURLConnection

public class DelegatingURLConnection
extends URLConnection

An delegating URLConnection support class.

Version:
$Revision: 1.5.6.1 $
Author:
Jason Dillon

Field Summary
protected  URLConnection delegateConnection
           
protected  URL delegateUrl
           
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
DelegatingURLConnection(URL url)
           
 
Method Summary
 void connect()
           
 boolean getAllowUserInteraction()
           
 Object getContent()
           
 Object getContent(Class[] classes)
           
 String getContentEncoding()
           
 int getContentLength()
           
 String getContentType()
           
 long getDate()
           
 boolean getDefaultUseCaches()
           
 boolean getDoInput()
           
 boolean getDoOutput()
           
 long getExpiration()
           
 String getHeaderField(int n)
           
 String getHeaderField(String name)
           
 long getHeaderFieldDate(String name, long _default)
           
 int getHeaderFieldInt(String name, int _default)
           
 String getHeaderFieldKey(int n)
           
 long getIfModifiedSince()
           
 InputStream getInputStream()
           
 long getLastModified()
           
 OutputStream getOutputStream()
           
 Permission getPermission()
           
 String getRequestProperty(String key)
           
 URL getURL()
           
 boolean getUseCaches()
           
protected  URL makeDelegateUrl(URL url)
           
protected  URLConnection makeDelegateUrlConnection(URL url)
           
 void setAllowUserInteraction(boolean allowuserinteraction)
           
 void setDefaultUseCaches(boolean defaultusecaches)
           
 void setDoInput(boolean doinput)
           
 void setDoOutput(boolean dooutput)
           
 void setIfModifiedSince(long ifmodifiedsince)
           
 void setRequestProperty(String key, String value)
           
 void setUseCaches(boolean usecaches)
           
 String toString()
           
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getConnectTimeout, getDefaultAllowUserInteraction, getDefaultRequestProperty, getFileNameMap, getHeaderFields, getReadTimeout, getRequestProperties, guessContentTypeFromName, guessContentTypeFromStream, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setFileNameMap, setReadTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

delegateUrl

protected URL delegateUrl

delegateConnection

protected URLConnection delegateConnection
Constructor Detail

DelegatingURLConnection

public DelegatingURLConnection(URL url)
                        throws MalformedURLException,
                               IOException
Throws:
MalformedURLException
IOException
Method Detail

makeDelegateUrl

protected URL makeDelegateUrl(URL url)
                       throws MalformedURLException,
                              IOException
Throws:
MalformedURLException
IOException

makeDelegateUrlConnection

protected URLConnection makeDelegateUrlConnection(URL url)
                                           throws IOException
Throws:
IOException

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

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 URLConnection

getHeaderFieldKey

public String getHeaderFieldKey(int n)
Overrides:
getHeaderFieldKey in class URLConnection

getHeaderField

public String getHeaderField(int n)
Overrides:
getHeaderField in class URLConnection

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 URLConnection
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

toString

public String toString()
Overrides:
toString in class URLConnection

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

getRequestProperty

public String getRequestProperty(String key)
Overrides:
getRequestProperty in class URLConnection


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.