Class Compressor
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.rolling.helper.Compressor
- All Implemented Interfaces:
ContextAware
The
Compression
class implements ZIP and GZ file
compression/decompression methods.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
(package private) final CompressionMode
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFuture<?>
asyncCompress
(String nameOfFile2Compress, String nameOfCompressedFile, String innerEntryName) void
static String
computeFileNameStrWithoutCompSuffix
(String fileNamePatternStr, CompressionMode compressionMode) (package private) ZipEntry
computeZipEntry
(File zippedFile) (package private) ZipEntry
computeZipEntry
(String filename) (package private) void
private void
gzCompress
(String nameOfFile2gz, String nameOfgzedFile) toString()
private void
zipCompress
(String nameOfFile2zip, String nameOfZippedFile, String innerEntryName) Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Field Details
-
compressionMode
-
BUFFER_SIZE
static final int BUFFER_SIZE- See Also:
-
-
Constructor Details
-
Compressor
-
-
Method Details
-
compress
public void compress(String nameOfFile2Compress, String nameOfCompressedFile, String innerEntryName) - Parameters:
nameOfFile2Compress
-nameOfCompressedFile
-innerEntryName
- The name of the file within the zip file. Use for ZIP compression.
-
zipCompress
-
computeZipEntry
-
computeZipEntry
-
gzCompress
-
computeFileNameStrWithoutCompSuffix
public static String computeFileNameStrWithoutCompSuffix(String fileNamePatternStr, CompressionMode compressionMode) -
createMissingTargetDirsIfNecessary
-
toString
-
asyncCompress
public Future<?> asyncCompress(String nameOfFile2Compress, String nameOfCompressedFile, String innerEntryName) throws RolloverFailure - Throws:
RolloverFailure
-