public final class ZipCompressAction extends AbstractAction
LOGGER| Constructor | Description |
|---|---|
ZipCompressAction(File source,
File destination,
boolean deleteSource,
int level) |
Creates new instance of GzCompressAction.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
execute() |
Compresses.
|
static boolean |
execute(File source,
File destination,
boolean deleteSource,
int level) |
Compresses a file.
|
File |
getDestination() |
|
int |
getLevel() |
|
File |
getSource() |
|
boolean |
isDeleteSource() |
|
protected void |
reportException(Exception ex) |
Captures exception.
|
String |
toString() |
close, isComplete, isInterrupted, runpublic ZipCompressAction(File source, File destination, boolean deleteSource, int level)
source - file to compress, may not be null.destination - compressed file, may not be null.deleteSource - if true, attempt to delete file on completion. Failure to delete does not cause an exception
to be thrown or affect return value.level - TODOpublic boolean execute()
throws IOException
execute in interface Actionexecute in class AbstractActionIOException - on IO exception.public static boolean execute(File source, File destination, boolean deleteSource, int level) throws IOException
source - file to compress, may not be null.destination - compressed file, may not be null.deleteSource - if true, attempt to delete file on completion. Failure to delete does not cause an exception
to be thrown or affect return value.level - the compression levelIOException - on IO exception.protected void reportException(Exception ex)
reportException in class AbstractActionex - exception.public File getSource()
public File getDestination()
public boolean isDeleteSource()
public int getLevel()
Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.