public class Zipper
extends java.lang.Thread
Zipper zipper = new Zipper();
zipper.setExcludePattern(".svn");
zipper.setZipFolder(zipFolder);
zipper.setZipSourceFolder(srcFolder);
zipper.doZipFolder();
Zipper zipper = new Zipper();
zipper.setUnzipZipFolder(zipFolder);
zipper.setUnzipDestinationFolder(destFolder);
zipper.doUnzipFolder();
Constructor and Description |
---|
Zipper()
Instantiates a new Zipper.
|
Zipper(java.awt.Frame owner)
Instantiates a new Zipper.
|
Modifier and Type | Method and Description |
---|---|
void |
doUnzipFolder()
Will do the unzipping of the previously specified zip-file
|
void |
doZipFolder()
This method can be invoked after the parameters are set for zipping a folder.
|
java.lang.String |
getExcludePattern()
This method returns the current String, which is used for excluding files to be packed to the zip-file.
|
java.awt.Image |
getIconImage()
Returns the icon image for the visualization of the zip progress.
|
java.lang.String |
getLookAndFeelClassName()
Returns the look and feel class reference.
|
java.lang.String |
getRootFolder2Extract()
This method will evaluate the zip-file in order to find the root-folder of the zip
|
java.lang.String |
getUnzipDestinationFolder()
Get the current destination folder for unzipping here
|
java.lang.String |
getUnzipZipFolder()
Get the currently specified zipFile/Folder here
|
java.lang.String |
getZipFolder()
Returns the path to the current zip-file for zipping a folder structure
|
java.lang.String |
getZipSourceFolder()
Get the current source folder for packing into a zip-file
|
boolean |
isDone()
Checks if the operation is done.
|
boolean |
isHeadlessOperation()
Checks if is headless (un)zip operation.
|
boolean |
isRunInThread()
Return if the defined process is to be executed in an own thread.
|
void |
run()
Starts the execution of the zip- or unzip process in the current thread.
|
void |
setAfterJobTask(java.lang.Runnable afterJobTask)
Sets the after job task.
|
void |
setApplicationName(java.lang.String applicationName)
Sets the application name.
|
void |
setDone(boolean done)
Sets that the operation is done.
|
void |
setExcludePattern(java.lang.String excludePattern)
This exclude pattern can be used in oder to prevent some
types of files to be packed.
|
void |
setIconImage(java.awt.Image iconImage)
Sets the icon image for the visualization of the zip progress.
|
void |
setLookAndFeelClassName(java.lang.String lookAndFeelClassReference)
Sets the look and feel class reference.
|
void |
setRunInThread(boolean isRunInThread)
Sets to execute the defined process in an own thread or not (the default is true).
|
void |
setUnzipDestinationFolder(java.lang.String unzipDestinationFolder)
Set the destination folder for unzipping a zip-File/Folder here
|
void |
setUnzipZipFolder(java.lang.String zipFolder)
Specify the zip-File/Folder here, which has to unpacked
|
void |
setZipFolder(java.lang.String zipFolder)
This method can be used in order to specify the zip-file, which has to be packed
|
void |
setZipSourceFolder(java.lang.String zipSourceFolder)
Define the source folder, which has to be packed here.
|
void |
startInCurrentThread()
Does the actual
Zipper action. |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public Zipper()
public Zipper(java.awt.Frame owner)
owner
- the owner frame of the zipperpublic void setRunInThread(boolean isRunInThread)
isRunInThread
- the new extract in threadpublic boolean isRunInThread()
public void setDone(boolean done)
done
- the new donepublic boolean isDone()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void startInCurrentThread()
Zipper
action. Call this method, if you want to do the
zipping or unzipping in the current thread. Otherwise use the Thread.start()
method of the thread
want to do the actionpublic void setApplicationName(java.lang.String applicationName)
applicationName
- the new application namepublic void setIconImage(java.awt.Image iconImage)
iconImage
- the new icon imagepublic java.awt.Image getIconImage()
public void setLookAndFeelClassName(java.lang.String lookAndFeelClassReference)
lookAndFeelClassName
- the new look and feel class referencepublic java.lang.String getLookAndFeelClassName()
public void setAfterJobTask(java.lang.Runnable afterJobTask)
afterJobTask
- the new after job taskpublic void setExcludePattern(java.lang.String excludePattern)
excludePattern
- the excludePattern to setpublic java.lang.String getExcludePattern()
public void setZipFolder(java.lang.String zipFolder)
zipFolder
- the zip-folder to setpublic java.lang.String getZipFolder()
public void setZipSourceFolder(java.lang.String zipSourceFolder)
zipSourceFolder
- the zipSourceFolder to setpublic java.lang.String getZipSourceFolder()
public void setUnzipZipFolder(java.lang.String zipFolder)
zipFolder
- the zip-folder to unzippublic java.lang.String getUnzipZipFolder()
public void setUnzipDestinationFolder(java.lang.String unzipDestinationFolder)
unzipDestinationFolder
- the destination folder for unzippingpublic java.lang.String getUnzipDestinationFolder()
public boolean isHeadlessOperation()
public java.lang.String getRootFolder2Extract()
public void doUnzipFolder()
java.lang.Exception
public void doZipFolder()