KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > util > jar > JarFile

java.util.jar
Class JarFile

java.lang.Object
  extended by java.util.zip.ZipFile
      extended by java.util.jar.JarFile
See Also:
Top Examples, Source Code, NullPointerException, Manifest, JarEntry

public static final int CENATT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENATX
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENCOM
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENCRC
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENDSK
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENEXT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENFLG
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENHDR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENHOW
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENLEN
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENNAM
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENOFF
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final long CENSIG
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENSIZ
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENTIM
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENVEM
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int CENVER
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int ENDCOM
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int ENDHDR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int ENDOFF
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final long ENDSIG
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int ENDSIZ
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int ENDSUB
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int ENDTOT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Enumeration<JarEntry> entries()
See Also:
ZipFile
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int EXTCRC
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int EXTHDR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int EXTLEN
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final long EXTSIG
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int EXTSIZ
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public ZipEntry getEntry(String name)
See Also:
IllegalStateException, ZipFile
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public InputStream getInputStream(ZipEntry ze)
                           throws IOException
See Also:
IllegalStateException, SecurityException, ZipException, ZipFile
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public JarEntry getJarEntry(String name)
See Also:
IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


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


public JarFile(File file)
        throws IOException
See Also:
SecurityException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public JarFile(File file,
               boolean verify)
        throws IOException
See Also:
SecurityException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public JarFile(File file,
               boolean verify,
               int mode)
        throws IOException
See Also:
SecurityException, IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public JarFile(String name)
        throws IOException
See Also:
SecurityException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[179]Extract file from jar
By Edward Sumerfield on 2004/04/10 08:35:41  Rate
private String extractFileFromJar (  
         String a_jarPath, 
         String a_jarFileName, 
         String a_targetFileName )  
         throws IOException, FileNotFoundException 
      {  
         String l_dllPath; 
  
  
         JarFile l_jarFile = new JarFile ( a_jarPath ) ; 
         ZipEntry l_zipFile = l_jarFile.getEntry ( a_jarFileName ) ; 
         if  ( null == l_zipFile )  
          {  
             throw new FileNotFoundException ( "Dll not in jar file" ) ; 
          }  
  
  
         InputStream l_fileIn = l_jarFile.getInputStream ( l_zipFile ) ; 
  
  
         File l_dllFile = new File ( a_targetFileName ) ; 
         FileOutputStream l_fileOut = new FileOutputStream ( l_dllFile ) ; 
  
  
         int l_length = 0; 
         byte [  ]  l_buffer = new byte [ 1024 ] ; 
         while  ( -1 != l_length )  
          {  
             l_length = l_fileIn.read ( l_buffer ) ; 
             if  ( l_length  >  0 )  
              {  
                 l_fileOut.write ( l_buffer, 0, l_length ) ; 
              }  
          }  
  
  
         l_fileIn.close (  ) ; 
         l_fileOut.close (  ) ; 
         l_jarFile.close (  ) ; 
  
  
         l_dllPath = l_dllFile.getParent (  ) ; 
         return l_dllPath; 
      } 


public JarFile(String name,
               boolean verify)
        throws IOException
See Also:
SecurityException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int LOCCRC
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int LOCEXT
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int LOCFLG
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int LOCHDR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int LOCHOW
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int LOCLEN
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int LOCNAM
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final long LOCSIG
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int LOCSIZ
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int LOCTIM
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int LOCVER
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final String MANIFEST_NAME
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags