net.sf.jpackit.pkg.classloader.url
Class JPackitURLConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by java.net.JarURLConnection
          extended by net.sf.jpackit.pkg.classloader.url.JPackitURLConnection

public class JPackitURLConnection
extends java.net.JarURLConnection

URLConnection implementation that gets jar in internal package format decodes(if needed), saves it in temporary folder and returns JarFile to JPackitURLClassLoader

Author:
Kamil K. Shamgunov

Field Summary
 
Fields inherited from class java.net.JarURLConnection
jarFileURLConnection
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
JPackitURLConnection(JPackitClassLoaderContext jpackitContext, java.net.URL url)
          Creates a new instance of JPackitURLConnection
 
Method Summary
 void connect()
           
 java.io.InputStream getInputStream()
           
 java.util.jar.JarFile getJarFile()
           
 java.util.jar.Attributes getMainAttributes()
           
 java.util.jar.Manifest getManifest()
           
 
Methods inherited from class java.net.JarURLConnection
getAttributes, getCertificates, getEntryName, getJarEntry, getJarFileURL
 
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

JPackitURLConnection

public JPackitURLConnection(JPackitClassLoaderContext jpackitContext,
                            java.net.URL url)
                     throws java.net.MalformedURLException
Creates a new instance of JPackitURLConnection

Throws:
java.net.MalformedURLException
Method Detail

connect

public void connect()
             throws java.io.IOException
Specified by:
connect in class java.net.URLConnection
Throws:
java.io.IOException

getJarFile

public java.util.jar.JarFile getJarFile()
                                 throws java.io.IOException
Specified by:
getJarFile in class java.net.JarURLConnection
Throws:
java.io.IOException

getManifest

public java.util.jar.Manifest getManifest()
                                   throws java.io.IOException
Overrides:
getManifest in class java.net.JarURLConnection
Throws:
java.io.IOException

getMainAttributes

public java.util.jar.Attributes getMainAttributes()
                                           throws java.io.IOException
Overrides:
getMainAttributes in class java.net.JarURLConnection
Throws:
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Overrides:
getInputStream in class java.net.URLConnection
Throws:
java.io.IOException