Package jetbrains.buildServer.util.impl
Class AlteringZipArchiveExtractor
- java.lang.Object
-
- jetbrains.buildServer.util.impl.AlteringZipArchiveExtractor
-
- All Implemented Interfaces:
TeamCityExtension
,ArchiveExtractor
- Direct Known Subclasses:
AgentAlteringZipArchiveExtractor
,ServerAlteringZipArchiveExtractor
public abstract class AlteringZipArchiveExtractor extends Object implements ArchiveExtractor
Created by Nikita.Skvortsov date: 25.06.2015.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
FALLBACK_ZIP_EXTRACTION
protected boolean
myUseStream
-
Constructor Summary
Constructors Constructor Description AlteringZipArchiveExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
extractFiles(File archive, ArchiveFileSelector selector)
Extracts files from given archive filtered by file selectorMap<String,Long>
getEntitiesSize(File archive)
Map<String,Integer>
getEntitiesUnixPermissions(File archive)
boolean
isSupported(File archive)
Detect whether archive can be extract by this extractorprotected boolean
isUseStream()
void
setEncoding(String encoding)
protected void
setUseStream(boolean useStream)
-
-
-
Field Detail
-
FALLBACK_ZIP_EXTRACTION
protected static final String FALLBACK_ZIP_EXTRACTION
- See Also:
- Constant Field Values
-
myUseStream
protected volatile boolean myUseStream
-
-
Method Detail
-
setUseStream
protected void setUseStream(boolean useStream)
-
isUseStream
protected boolean isUseStream()
-
isSupported
public boolean isSupported(@NotNull File archive)
Description copied from interface:ArchiveExtractor
Detect whether archive can be extract by this extractor- Specified by:
isSupported
in interfaceArchiveExtractor
- Parameters:
archive
- path to archive- Returns:
- whether archive can be extract by this extractor
-
getEntitiesSize
public Map<String,Long> getEntitiesSize(@NotNull File archive) throws IOException
- Specified by:
getEntitiesSize
in interfaceArchiveExtractor
- Parameters:
archive
- archive to be processed- Returns:
- map of entities name to uncompressed size on this entry, same names which are used in
ArchiveFileSelector
will be used as keys, -1 as size may be returned if size is unknown - Throws:
IOException
- Error occurred during extraction
-
getEntitiesUnixPermissions
public Map<String,Integer> getEntitiesUnixPermissions(@NotNull File archive) throws IOException
- Specified by:
getEntitiesUnixPermissions
in interfaceArchiveExtractor
- 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
-
extractFiles
public void extractFiles(@NotNull File archive, @NotNull ArchiveFileSelector selector) throws IOException
Description copied from interface:ArchiveExtractor
Extracts files from given archive filtered by file selector- Specified by:
extractFiles
in interfaceArchiveExtractor
- Parameters:
archive
- archive to be processedselector
- selector for files within the archive- Throws:
IOException
- Error occurred during extraction
-
setEncoding
public void setEncoding(@NotNull String encoding)
-
-