Class Compressor
java.lang.Object
org.codehaus.plexus.archiver.util.Compressor
- Direct Known Subclasses:
BZip2Compressor
,GZipCompressor
,SnappyCompressor
,XZCompressor
,ZstdCompressor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
close()
subclasses must implement this method to cleanup after compression this is public so the process of compression and closing can be dealt with separately.abstract void
compress()
subclasses must implement this method to do their compression this is public so the process of compression and closing can be dealt with separately.protected void
compress
(org.codehaus.plexus.components.io.resources.PlexusIoResource resource, OutputStream zOut) compress a resource to an output streamprotected org.slf4j.Logger
org.codehaus.plexus.components.io.resources.PlexusIoResource
The resource to compress; required.void
setDestFile
(File compressFile) the required destination file.void
setSource
(org.codehaus.plexus.components.io.resources.PlexusIoResource source) The resource to compress; required.
-
Constructor Details
-
Compressor
public Compressor()
-
-
Method Details
-
getLogger
protected org.slf4j.Logger getLogger() -
setDestFile
the required destination file.- Parameters:
compressFile
-
-
getDestFile
-
setSource
public void setSource(org.codehaus.plexus.components.io.resources.PlexusIoResource source) The resource to compress; required. -
getSource
public org.codehaus.plexus.components.io.resources.PlexusIoResource getSource()The resource to compress; required. -
compress
protected void compress(org.codehaus.plexus.components.io.resources.PlexusIoResource resource, OutputStream zOut) throws IOException compress a resource to an output stream- Throws:
IOException
-
compress
subclasses must implement this method to do their compression this is public so the process of compression and closing can be dealt with separately.- Throws:
ArchiverException
-
close
subclasses must implement this method to cleanup after compression this is public so the process of compression and closing can be dealt with separately.- Throws:
ArchiverException
-