com.dyuproject.util
Class ArchiveUtil

java.lang.Object
  extended by com.dyuproject.util.ArchiveUtil

public abstract class ArchiveUtil
extends Object

Util for extracting *.jar, *.war and *.zip archives.

Author:
David Yu

Field Summary
static String[] SUPPORTED_FILES
           
 
Constructor Summary
ArchiveUtil()
           
 
Method Summary
static boolean extract(File archive, File targetDir)
           
static boolean extract(File archive, File targetDir, boolean deleteOnExit)
           
static boolean extract(URL archive, File targetDir)
           
static boolean extract(URL archive, File targetDir, boolean deleteOnExit)
           
static File getTempDir()
           
static boolean isSupported(String resource)
           
static void setTempDir(File tempDir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUPPORTED_FILES

public static final String[] SUPPORTED_FILES
Constructor Detail

ArchiveUtil

public ArchiveUtil()
Method Detail

setTempDir

public static void setTempDir(File tempDir)

getTempDir

public static File getTempDir()

isSupported

public static boolean isSupported(String resource)

extract

public static boolean extract(File archive,
                              File targetDir)
                       throws IOException
Throws:
IOException

extract

public static boolean extract(File archive,
                              File targetDir,
                              boolean deleteOnExit)
                       throws IOException
Throws:
IOException

extract

public static boolean extract(URL archive,
                              File targetDir)
                       throws IOException
Throws:
IOException

extract

public static boolean extract(URL archive,
                              File targetDir,
                              boolean deleteOnExit)
                       throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.