|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.at4j.util.archive.ArchiveExtractor
public class ArchiveExtractor
This object can be used to extract some or all of the entries from an archive to a directory. No metadata is copied to the extracted entries. Symbolic links are not supported and they will be ignored.
An extraction operation is configured with an optional
ExtractSpecification
object. It can be used to fine-tune the
extraction process.
TarExtractor
Constructor Summary | |
---|---|
ArchiveExtractor(Archive<?,?> archive)
Create a new archive extractor that extracts contents from the supplied archive. |
Method Summary | |
---|---|
void |
extract(DirectoryView target)
Extract all entries in the archive to the supplied directory. |
void |
extract(DirectoryView target,
ExtractSpecification spec)
Extract the archive entries that match the supplied filter to the target directory. |
void |
extract(File target)
Extract all entries in the archive to the supplied directory. |
void |
extract(File target,
ExtractSpecification spec)
Extract the archive entries that match the supplied filter to the target directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArchiveExtractor(Archive<?,?> archive)
archive
- The archive to extract contents from.Method Detail |
---|
public void extract(DirectoryView target) throws WrappedIOException
target
- The target directory. If this is a view, all its view
settings will be ignored.
WrappedIOException
- On I/O errors.public void extract(DirectoryView target, ExtractSpecification spec) throws WrappedIOException
target
- The target directory. If this is a view, all its view
settings will be ignored.spec
- The specification object that contains configuration for this
extraction. ArchiveEntryFilter
.
WrappedIOException
- On I/O errors.public void extract(File target) throws WrappedIOException, EntityNotFoundException, NotADirectoryException
target
- The target directory. This must be an existing directory.
WrappedIOException
- On I/O errors.
EntityNotFoundException
- If the target directory does not exist.
NotADirectoryException
- If the target exists but is not a
directory.public void extract(File target, ExtractSpecification spec) throws WrappedIOException, EntityNotFoundException, NotADirectoryException
target
- The target directory. This must be an existing directory.spec
- The specification object that contains configuration for this
extraction.
WrappedIOException
- On I/O errors.
EntityNotFoundException
- If the target directory does not exist.
NotADirectoryException
- If the target exists but is not a
directory.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |