net.sf.jameleon.util
Class JarResourceExtractor

java.lang.Object
  extended by net.sf.jameleon.util.JarResourceExtractor

public class JarResourceExtractor
extends Object

Extracts contents from jar file to the defined directory.


Constructor Summary
JarResourceExtractor()
          Searches the classpath for the jameleon-core.jar file to use to find the desired resources.
 
Method Summary
 void extractFile(ZipEntry entry, File extractDir)
           
 void extractFilesInDirectory(String baseDirectory, File directoryToExtractTo)
          Extracts the files from the jar file to the desired directory.
 JarFile getJarFile()
          Gets the jar file that contains the desired resources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarResourceExtractor

public JarResourceExtractor()
                     throws IOException
Searches the classpath for the jameleon-core.jar file to use to find the desired resources.

Throws:
IOException - if a jar file containing the jameleon core version config file cannot be found.
Method Detail

getJarFile

public JarFile getJarFile()
Gets the jar file that contains the desired resources

Returns:

extractFilesInDirectory

public void extractFilesInDirectory(String baseDirectory,
                                    File directoryToExtractTo)
                             throws IOException
Extracts the files from the jar file to the desired directory.

Parameters:
baseDirectory - The directory that contains the files to extract
directoryToExtractTo - The directory to copy the files to
Throws:
IOException

extractFile

public void extractFile(ZipEntry entry,
                        File extractDir)
                 throws IOException
Throws:
IOException


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.