org.apache.avalon.repository
Class ArtifactURLConnection

java.lang.Object
  extended byjava.net.URLConnection
      extended byorg.apache.avalon.repository.AbstractURLConnection
          extended byorg.apache.avalon.repository.ArtifactURLConnection

public class ArtifactURLConnection
extends AbstractURLConnection

Repository URL protocol handler.


Field Summary
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Method Summary
 Object getContent()
          Return the Artifact specified by this URL.
protected  Object getContent(String defaultType)
          Return the Artifact specified by this URL.
 
Methods inherited from class org.apache.avalon.repository.AbstractURLConnection
connect, getContent, getQueryField, getVersion
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getInputStream, getLastModified, getOutputStream, getPermission, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getContent

public Object getContent()
                  throws IOException
Return the Artifact specified by this URL.

Returns:
the artifact instance
Throws:
IOException

getContent

protected Object getContent(String defaultType)
                     throws IOException
Return the Artifact specified by this URL.

Overrides:
getContent in class AbstractURLConnection
Parameters:
defaultType - the artifact type (e.g. "jar", "block", "xml", etc.)
Returns:
the artifact instance
Throws:
IOException
See Also:
Artifact


Copyright © The Apache Software Foundation. All Rights Reserved.