org.ops4j.pax.url.cache.internal
Class Connection

java.lang.Object
  extended by java.net.URLConnection
      extended by org.ops4j.pax.url.cache.internal.Connection

public class Connection
extends URLConnection

TODO Add JavaDoc.

Since:
06 02, 2009
Author:
Alin Dreghiciu (adreghiciu@gmail.com)

Field Summary
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
protected Connection(URL url, Configuration configuration)
          Creates a new connection.
 
Method Summary
 void connect()
          Does nothing.
 InputStream getInputStream()
          Returns the input stream denoted by the url.
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Connection

protected Connection(URL url,
                     Configuration configuration)
              throws IOException
Creates a new connection.

Parameters:
url - url to be handled; cannot be null.
configuration - protocol configuration; cannot be null
Throws:
MalformedURLException - - If url path is empty
IOException - - If cache name cannot be generated
org.ops4j.lang.NullArgumentException - - If url or configuration is null
Method Detail

connect

public void connect()
Does nothing.

Specified by:
connect in class URLConnection

getInputStream

public InputStream getInputStream()
                           throws IOException
Returns the input stream denoted by the url.

Overrides:
getInputStream in class URLConnection
Returns:
the input stream for the resource denoted by url
Throws:
IOException - in case of an exception during accessing the resource
See Also:
URLConnection.getInputStream()


Copyright © 2006-2013 OPS4J - Open Participation Software for Java. All Rights Reserved.