public class Exploder extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ARCHIVE_UNPACK_SUFFIX
Use a unique suffix for unpacking archives.
|
| Constructor and Description |
|---|
Exploder() |
| Modifier and Type | Method and Description |
|---|---|
Exploder |
disableRecursion()
This will disable recursive unpack.
|
Exploder |
excludeSuffix(String suffix)
Register suffix to ignore when exploding the archive(s).
|
Set<String> |
getSupportedSuffixes() |
void |
unpack(ExploderFileProcessor processor,
File root)
Unpacks the contents of the file/directory, decompressing and unarchiving recursively.
|
void |
unpack(ExploderFileProcessor processor,
URL url)
Unpacks the contents of the remote file, decompressing and unarchiving recursively.
|
void |
unpack(File root)
Unpacks the contents of the file/directory, decompressing and unarchiving recursively.
|
void |
unpack(String path)
Unpacks the contents of the url/file/directory, decompressing and unarchiving recursively.
|
Exploder |
useTargetDirectory(File targetDirectory)
This will configure the current instance to use the specified target directory
and copy the target File to it prior to unpacking.
|
Exploder |
useTemporaryDirectory()
This will configure the current instance to use a temporary directory to
copy the target File to prior to unpacking.
|
public static final String ARCHIVE_UNPACK_SUFFIX
public Exploder excludeSuffix(String suffix) throws InternalException
suffix - the suffix to ignore e.g. .jarInternalException - if an error occurs.public Exploder disableRecursion()
public Exploder useTemporaryDirectory() throws InternalException
ExploderFileProcessor on an archive. This WILL delete the temporary
directory on completion.InternalException - if an error occurs.public Exploder useTargetDirectory(File targetDirectory) throws InternalException
targetDirectory - the specified target directory to configure.InternalException - if an error occurs.public void unpack(String path) throws InternalException
path - root url, file (or directory contents) to explodeInternalException - if an error occurs.public void unpack(ExploderFileProcessor processor, URL url) throws InternalException
processor - the optional FileProcessorurl - remote file to explodeInternalException - if an error occurs.public void unpack(File root) throws InternalException
root - root file (or directory contents) to explodeInternalException - if an error occurs.public void unpack(ExploderFileProcessor processor, File root) throws InternalException
processor - the optional FileProcessorroot - root file (or directory contents) to explodeInternalException - if an error occurs.Copyright © 2018-2019. All Rights Reserved.