public final class ZipCompressAction extends ActionBase
| Constructor and Description |
|---|
ZipCompressAction(File source,
File destination,
boolean deleteSource)
Create new instance of GZCompressAction.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
execute()
Compress.
|
static boolean |
execute(File source,
File destination,
boolean deleteSource)
Compress a file.
|
protected void |
reportException(Exception ex)
Capture exception.
|
close, isComplete, runpublic ZipCompressAction(File source, File destination, boolean deleteSource)
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.public boolean execute()
throws IOException
execute in interface Actionexecute in class ActionBaseIOException - on IO exception.public static boolean execute(File source, File destination, boolean deleteSource) 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.IOException - on IO exception.protected void reportException(Exception ex)
reportException in class ActionBaseex - exception.Copyright © 2013 The Apache Software Foundation. Licensed under the Apache License, Version 2.0
Apache Extras for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.