org.apache.geronimo.system.url
Class DelegatingURLConnection

java.lang.Object
  extended byjava.net.URLConnection
      extended byorg.apache.geronimo.system.url.DelegatingURLConnection
Direct Known Subclasses:
ResourceURLConnection

public class DelegatingURLConnection
extends URLConnection

An delegating URLConnection support class.

Version:
$Revision: 1.2 $ $Date: 2004/03/10 09:59:31 $

Field Summary
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
DelegatingURLConnection(URL url)
           
 
Method Summary
 void addRequestProperty(String key, String value)
           
 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)
           
 Map getHeaderFields()
           
 long getIfModifiedSince()
           
 InputStream getInputStream()
           
 long getLastModified()
           
 OutputStream getOutputStream()
           
 Permission getPermission()
           
 Map getRequestProperties()
           
 String getRequestProperty(String key)
           
 URL getURL()
           
 boolean getUseCaches()
           
protected  URL makeDelegateUrl(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
getDefaultAllowUserInteraction, getDefaultRequestProperty, getFileNameMap, guessContentTypeFromName, guessContentTypeFromStream, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setFileNameMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DelegatingURLConnection

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

makeDelegateUrl

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

connect

public void connect()
             throws IOException
Throws:
IOException

getURL

public URL getURL()

getContentLength

public int getContentLength()

getContentType

public String getContentType()

getContentEncoding

public String getContentEncoding()

getExpiration

public long getExpiration()

getDate

public long getDate()

getLastModified

public long getLastModified()

getHeaderField

public String getHeaderField(String name)

getHeaderFields

public Map getHeaderFields()

getHeaderFieldInt

public int getHeaderFieldInt(String name,
                             int _default)

getHeaderFieldDate

public long getHeaderFieldDate(String name,
                               long _default)

getHeaderFieldKey

public String getHeaderFieldKey(int n)

getHeaderField

public String getHeaderField(int n)

getContent

public Object getContent()
                  throws IOException
Throws:
IOException

getContent

public Object getContent(Class[] classes)
                  throws IOException
Throws:
IOException

getPermission

public Permission getPermission()
                         throws IOException
Throws:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Throws:
IOException

toString

public String toString()

setDoInput

public void setDoInput(boolean doinput)

getDoInput

public boolean getDoInput()

setDoOutput

public void setDoOutput(boolean dooutput)

getDoOutput

public boolean getDoOutput()

setAllowUserInteraction

public void setAllowUserInteraction(boolean allowuserinteraction)

getAllowUserInteraction

public boolean getAllowUserInteraction()

setUseCaches

public void setUseCaches(boolean usecaches)

getUseCaches

public boolean getUseCaches()

setIfModifiedSince

public void setIfModifiedSince(long ifmodifiedsince)

getIfModifiedSince

public long getIfModifiedSince()

getDefaultUseCaches

public boolean getDefaultUseCaches()

setDefaultUseCaches

public void setDefaultUseCaches(boolean defaultusecaches)

setRequestProperty

public void setRequestProperty(String key,
                               String value)

addRequestProperty

public void addRequestProperty(String key,
                               String value)

getRequestProperty

public String getRequestProperty(String key)

getRequestProperties

public Map getRequestProperties()


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.