|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.evanmclean.evlib.util.zip.Unzipper
public class Unzipper
Unzips an entire zip file into a specified base folder, creating sub-folders as needed.
| Nested Class Summary | |
|---|---|
static class |
Unzipper.FolderAction
How to handle folder entries in the zip file (sub-folders are always created for files as needed). |
| Constructor Summary | |
|---|---|
Unzipper()
Create unzipper with the default Unzipper.FolderAction of
Unzipper.FolderAction.CREATE. |
|
Unzipper(Unzipper.FolderAction folder_action)
Create unzipper with the specified Unzipper.FolderAction. |
|
| Method Summary | |
|---|---|
Unzipper.FolderAction |
getFolderAction()
Get the current Unzipper.FolderAction. |
static void |
run(File zip_file,
File base_folder,
Unzipper.FolderAction folder_action)
Unzip the specified zip file. |
static void |
run(InputStream in,
File base_folder,
Unzipper.FolderAction folder_action)
Unzip the specified input stream. |
static void |
run(ZipInputStream in,
File base_folder,
Unzipper.FolderAction folder_action)
Unzip the specified zip input stream. |
void |
setFolderAction(Unzipper.FolderAction folder_action)
Set the Unzipper.FolderAction to use with the next unzip call. |
void |
unzip(File zip_file,
File base_folder)
Unzip the specified zip file. |
void |
unzip(InputStream in,
File base_folder)
Unzip the specified input stream. |
void |
unzip(ZipInputStream in,
File base_folder)
Unzip the specified zip input stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Unzipper()
Unzipper.FolderAction of
Unzipper.FolderAction.CREATE.
public Unzipper(Unzipper.FolderAction folder_action)
Unzipper.FolderAction.
folder_action - See Unzipper.FolderAction.| Method Detail |
|---|
public static void run(File zip_file,
File base_folder,
Unzipper.FolderAction folder_action)
throws IOException
zip_file - The zip file to unzip.base_folder - The base folder to unzip into (will be created if necessary).folder_action - See Unzipper.FolderAction.
IOException
public static void run(InputStream in,
File base_folder,
Unzipper.FolderAction folder_action)
throws IOException
in - The input stream to unzip.base_folder - The base folder to unzip into (will be created if necessary).folder_action - See Unzipper.FolderAction.
IOException
public static void run(ZipInputStream in,
File base_folder,
Unzipper.FolderAction folder_action)
throws IOException
in - The zip input stream to unzip.base_folder - The base folder to unzip into (will be created if necessary).folder_action - See Unzipper.FolderAction.
IOExceptionpublic Unzipper.FolderAction getFolderAction()
Unzipper.FolderAction.
Unzipper.FolderAction.public void setFolderAction(Unzipper.FolderAction folder_action)
Unzipper.FolderAction to use with the next unzip call.
folder_action - See Unzipper.FolderAction.
public void unzip(File zip_file,
File base_folder)
throws IOException
zip_file - The zip file to unzip.base_folder - The base folder to unzip into (will be created if necessary).
IOException
public void unzip(InputStream in,
File base_folder)
throws IOException
in - The input stream to unzip.base_folder - The base folder to unzip into (will be created if necessary).
IOException
public void unzip(ZipInputStream in,
File base_folder)
throws IOException
in - The zip input stream to unzip.base_folder - The base folder to unzip into (will be created if necessary).
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||