public class ArchiveFileManipulations
extends java.lang.Object
Constructor and Description |
---|
ArchiveFileManipulations() |
Modifier and Type | Method and Description |
---|---|
static void |
clearProviderCache(Shell shell)
Clears the cached structure provider after first finalizing it properly.
|
static boolean |
closeZipFile(java.util.zip.ZipFile file,
Shell shell)
Attempts to close the passed zip file, and answers a boolean indicating
success.
|
protected static void |
displayErrorDialog(java.lang.String message,
Shell shell)
Display an error dialog with the specified message.
|
protected static java.lang.String |
getErrorDialogTitle()
Get the title for an error dialog.
|
static TarLeveledStructureProvider |
getTarStructureProvider(TarFile targetTar,
Shell shell)
Returns a structure provider for the specified tar file.
|
static ZipLeveledStructureProvider |
getZipStructureProvider(java.util.zip.ZipFile targetZip,
Shell shell) |
static boolean |
isTarFile(java.lang.String fileName)
Determine whether the file with the given filename is in .tar.gz or .tar
format.
|
static boolean |
isZipFile(java.lang.String fileName)
Determine whether the file with the given filename is in .zip or .jar
format.
|
public static boolean isTarFile(java.lang.String fileName)
fileName
- file to testpublic static boolean isZipFile(java.lang.String fileName)
fileName
- file to testpublic static void clearProviderCache(Shell shell)
shell
- The shell to display any possible Dialogs inpublic static ZipLeveledStructureProvider getZipStructureProvider(java.util.zip.ZipFile targetZip, Shell shell)
targetZip
- shell
- public static boolean closeZipFile(java.util.zip.ZipFile file, Shell shell)
file
- The zip file to attempt to closeshell
- The shell to display error dialogs inpublic static TarLeveledStructureProvider getTarStructureProvider(TarFile targetTar, Shell shell)
targetTar
- The specified tar fileshell
- The shell to display dialogs inprotected static void displayErrorDialog(java.lang.String message, Shell shell)
message
- the error messageprotected static java.lang.String getErrorDialogTitle()