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, run
public 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 Action
execute
in class ActionBase
IOException
- 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 ActionBase
ex
- 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.