KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > net > JarURLConnection

java.net
Class JarURLConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by java.net.JarURLConnection
See Also:
Top Examples, Source Code, OutputStream, URL, JarFile, JarInputStream, Manifest, ZipEntry

public Attributes getAttributes()
                         throws IOException
See Also:
getJarEntry()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Certificate[] getCertificates()
                              throws IOException
See Also:
getJarEntry()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getEntryName()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public JarEntry getJarEntry()
                     throws IOException
See Also:
getJarFile()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract JarFile getJarFile()
                            throws IOException
See Also:
URLConnection.connect()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1414]Parsing the jar file
By Anonymous on 2005/05/04 18:51:38  Rate
//Parsing the jar file 
 String directory = ....; 
 URL url = MyClass.class.getResource ( directory ) ; 
 JarURLConnection con =  ( JarURLConnection )  url.openConnection (  ) ; 
 JarFile jar = con.getJarFile (  ) ; 
 Enumeration entries = jar.entries (  ) ; 
 List list = new ArrayList (  ) ; 
 while ( entries.hasNext (  )  )   {  
   ZipEntry entry =  ( ZipEntry ) entries.next (  ) ; 
   if ( entry.getName (  ) .starsWith ( directory )  )  
     list.add ( entry ) ; 
  }  
 //process list as necessary, using jar.getInputStream ( entry ) 


public URL getJarFileURL()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Attributes getMainAttributes()
                             throws IOException
See Also:
getManifest(), getJarFile()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Manifest getManifest()
                     throws IOException
See Also:
getJarFile()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected URLConnection jarFileURLConnection
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected JarURLConnection(URL url)
                    throws MalformedURLException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags