com.sun.enterprise.util.zip
Class ZipFile

java.lang.Object
  extended by com.sun.enterprise.util.zip.ZipFile

public class ZipFile
extends Object


Constructor Summary
ZipFile(File zipFile, File anExplodeDir)
           
ZipFile(InputStream inStream, File anExplodeDir)
           
ZipFile(InputStream inStream, String anExplodeDirName)
           
ZipFile(String zipFilename, String explodeDirName)
           
 
Method Summary
 ArrayList<String> explode()
          Explodes files as usual, and then explodes every jar file found.
static void extractJar(String jarEntryName, JarFile earFile, File jarFile)
          Extracts the named jar file from the ear.
 ArrayList getFileList()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipFile

public ZipFile(String zipFilename,
               String explodeDirName)
        throws ZipFileException
Throws:
ZipFileException

ZipFile

public ZipFile(InputStream inStream,
               String anExplodeDirName)
        throws ZipFileException
Throws:
ZipFileException

ZipFile

public ZipFile(File zipFile,
               File anExplodeDir)
        throws ZipFileException
Throws:
ZipFileException

ZipFile

public ZipFile(InputStream inStream,
               File anExplodeDir)
        throws ZipFileException
Throws:
ZipFileException
Method Detail

explode

public ArrayList<String> explode()
                          throws ZipFileException
Explodes files as usual, and then explodes every jar file found. All explosions are copied relative the same root directory.

It does a case-sensitive check for files that end with ".jar" will comment out for later possbile use public ArrayList explodeAll() throws ZipFileException { return doExplode(this); }

Throws:
ZipFileException

extractJar

public static void extractJar(String jarEntryName,
                              JarFile earFile,
                              File jarFile)
                       throws ZipFileException
Extracts the named jar file from the ear.

Parameters:
jarEntryName - name of the jar file
earFile - application archive
jarFile - locaton of the jar file where the jar entry will be extracted
Throws:
ZipFileException - if an error while extracting the jar

getFileList

public ArrayList getFileList()


Copyright © 2012 GlassFish Community. All Rights Reserved.