com.fusesource.tooling.fuse.cdc.api.archive
Class ArtifactArchiveUtil
java.lang.Object
com.fusesource.tooling.fuse.cdc.api.archive.ArtifactArchiveUtil
public class ArtifactArchiveUtil
- extends java.lang.Object
TODO Add Class documentation for ArtifactArchiveUtil
TODO Using TarArchiveOutputStream.LONGFILE_GNU as the default. Should it be
configurable?
|
Method Summary |
static java.io.File |
archive(java.io.File input,
java.io.File output,
java.lang.String type)
Creates an archive based archive type. |
static java.io.File |
unarchive(java.io.File input,
java.io.File output)
Utility method that will extract the contents of the following archives:
tar.gz
gz
zip
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZIP_ARCHIVE_TYPE
public static final java.lang.String ZIP_ARCHIVE_TYPE
- See Also:
- Constant Field Values
TAR_ARCHIVE_TYPE
public static final java.lang.String TAR_ARCHIVE_TYPE
- See Also:
- Constant Field Values
TAR_GZIP_ARCHIVE_TYPE
public static final java.lang.String TAR_GZIP_ARCHIVE_TYPE
- See Also:
- Constant Field Values
GZIP_ARCHIVE_TYPE
public static final java.lang.String GZIP_ARCHIVE_TYPE
- See Also:
- Constant Field Values
ArtifactArchiveUtil
public ArtifactArchiveUtil()
archive
public static java.io.File archive(java.io.File input,
java.io.File output,
java.lang.String type)
throws java.io.FileNotFoundException,
java.io.IOException,
org.apache.commons.compress.archivers.ArchiveException,
org.apache.commons.compress.compressors.CompressorException
- Creates an archive based archive type. Valid types are:
- Parameters:
input - the input archive File.output - the output directory File.type - the archive type
- Returns:
- the final archive of type
File.
- Throws:
java.io.FileNotFoundException
java.io.IOException
org.apache.commons.compress.archivers.ArchiveException
org.apache.commons.compress.compressors.CompressorException
unarchive
public static java.io.File unarchive(java.io.File input,
java.io.File output)
throws java.io.FileNotFoundException,
java.io.IOException,
org.apache.commons.compress.archivers.ArchiveException,
org.apache.commons.compress.compressors.CompressorException
- Utility method that will extract the contents of the following archives:
- Parameters:
input - the input archive File.output - the output directory File.type - the archive typeinput - output -
- Returns:
- the final archive of type
File.
- Throws:
java.io.FileNotFoundException
java.io.IOException
org.apache.commons.compress.archivers.ArchiveException
org.apache.commons.compress.compressors.CompressorException
Copyright © 2012 FuseSource. All Rights Reserved.