|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.logging.log4j.core.appender.rolling.action.AbstractAction
org.apache.logging.log4j.core.appender.rolling.action.ZipCompressAction
public final class ZipCompressAction
Compresses a file using Zip compression.
Field Summary |
---|
Fields inherited from class org.apache.logging.log4j.core.appender.rolling.action.AbstractAction |
---|
LOGGER |
Constructor Summary | |
---|---|
ZipCompressAction(File source,
File destination,
boolean deleteSource,
int level)
Create new instance of GzCompressAction. |
Method Summary | |
---|---|
boolean |
execute()
Compress. |
static boolean |
execute(File source,
File destination,
boolean deleteSource,
int level)
Compress a file. |
protected void |
reportException(Exception ex)
Capture exception. |
String |
toString()
|
Methods inherited from class org.apache.logging.log4j.core.appender.rolling.action.AbstractAction |
---|
close, isComplete, run |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public 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
- TODOMethod Detail |
---|
public boolean execute() throws IOException
execute
in interface Action
execute
in class AbstractAction
IOException
- 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 level
IOException
- on IO exception.protected void reportException(Exception ex)
reportException
in class AbstractAction
ex
- exception.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2015 Apache Software Foundation. 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.