public class TarExtractSpecification extends Object
TarExtractor
.
When this object is instantiated, it contains the default extraction settings:
ExtractTarEntryExtractionStrategy
).Constructor and Description |
---|
TarExtractSpecification() |
Modifier and Type | Method and Description |
---|---|
TarEntryExtractionStrategy |
getEntryExtractionStrategy()
Get the strategy object used for extracting entries.
|
Charset |
getFileNameCharset()
Get the charset used for decoding file names in the Tar file.
|
org.entityfs.support.filter.Filter<? super TarEntryHeaderData> |
getFilter()
Get the filter that is used to decide which of the Tar entries to
extract.
|
org.entityfs.ostrat.OverwriteStrategy |
getOverwriteStrategy()
Are existing entities overwritten with entries from the archive?
|
TarExtractSpecification |
setEntryExtractionStrategy(TarEntryExtractionStrategy strat)
Set the strategy object used for extracting entries.
|
TarExtractSpecification |
setFileNameCharset(Charset cs)
Set the charset to use for decoding file names in the Tar file (and the
names of other entry types as well).
|
TarExtractSpecification |
setFilter(org.entityfs.support.filter.Filter<? super TarEntryHeaderData> f)
Set the filter to use to decide which entries to extract.
|
TarExtractSpecification |
setOverwriteStrategy(org.entityfs.ostrat.OverwriteStrategy os)
If there already are an entity (file or directory) at the location where
an entry should be extracted, should the old entity be overwritten?
Should a warning message be printed?
|
public TarExtractSpecification setFilter(org.entityfs.support.filter.Filter<? super TarEntryHeaderData> f)
null
to extract all entries.
All entries in the Tar file are evaluated against this filter. If it matches an entry but not its parent directory, the parent directory is extracted anyway.
f
- The filter that is used to decide which entries to extract. Any
ArchiveEntryFilter
works here.public org.entityfs.support.filter.Filter<? super TarEntryHeaderData> getFilter()
null
, all entries are extracted.null
.public TarExtractSpecification setEntryExtractionStrategy(TarEntryExtractionStrategy strat)
strat
- The strategy object.public TarEntryExtractionStrategy getEntryExtractionStrategy()
public TarExtractSpecification setFileNameCharset(Charset cs)
cs
- The charset.public Charset getFileNameCharset()
public TarExtractSpecification setOverwriteStrategy(org.entityfs.ostrat.OverwriteStrategy os)
Non-empty directories cannot be overwritten. If the Tar extractor
attempts to do so, an TarFileParseException
is thrown.
os
- The strategy to use for overwriting entities.this
public org.entityfs.ostrat.OverwriteStrategy getOverwriteStrategy()
setOverwriteStrategy(OverwriteStrategy)