Package jetbrains.buildServer.util.impl
Class TarArchiveExtractor
- java.lang.Object
-
- jetbrains.buildServer.util.impl.CommonsCompressArchiveExtractorBase
-
- jetbrains.buildServer.util.impl.TarArchiveExtractor
-
- All Implemented Interfaces:
TeamCityExtension
,ArchiveExtractor
- Direct Known Subclasses:
ServerAwareTarArchiveExtractor
public class TarArchiveExtractor extends CommonsCompressArchiveExtractorBase
-
-
Constructor Summary
Constructors Constructor Description TarArchiveExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.commons.compress.archivers.ArchiveInputStream
createReader(File archive, InputStream archiveStream)
Map<String,Integer>
getEntitiesUnixPermissions(File archive)
byte[]
getSignature(InputStream in)
boolean
isBZip(InputStream in)
boolean
isGZip(InputStream in)
boolean
isSupported(File archive)
Detect whether archive can be extract by this extractorboolean
isTar(InputStream in)
protected void
postProcessEntry(org.apache.commons.compress.archivers.ArchiveEntry entry, File file, File root)
-
Methods inherited from class jetbrains.buildServer.util.impl.CommonsCompressArchiveExtractorBase
extractFiles, getEntitiesSize
-
-
-
-
Method Detail
-
getEntitiesUnixPermissions
public Map<String,Integer> getEntitiesUnixPermissions(@NotNull File archive) throws IOException
- Parameters:
archive
- archive to be processed- Returns:
- map of entities name to an integer representation of Unix permissions for this entry, same names which are used in
ArchiveFileSelector
will be used as keys, empty map if unix permissions are not available in the map - Throws:
IOException
- Error occurred during extraction
-
createReader
protected org.apache.commons.compress.archivers.ArchiveInputStream createReader(@NotNull File archive, @NotNull InputStream archiveStream) throws IOException
- Specified by:
createReader
in classCommonsCompressArchiveExtractorBase
- Throws:
IOException
-
postProcessEntry
protected void postProcessEntry(@NotNull org.apache.commons.compress.archivers.ArchiveEntry entry, @NotNull File file, @Nullable File root)
- Overrides:
postProcessEntry
in classCommonsCompressArchiveExtractorBase
-
isSupported
public boolean isSupported(@NotNull File archive)
Description copied from interface:ArchiveExtractor
Detect whether archive can be extract by this extractor- Parameters:
archive
- path to archive- Returns:
- whether archive can be extract by this extractor
-
getSignature
@Nullable public byte[] getSignature(InputStream in)
-
isTar
public boolean isTar(InputStream in)
-
isGZip
public boolean isGZip(InputStream in)
-
isBZip
public boolean isBZip(InputStream in)
-
-