Package adams.gui.tools.previewbrowser
Class TarArchiveHandler
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.tools.previewbrowser.AbstractArchiveHandler
-
- adams.gui.tools.previewbrowser.TarArchiveHandler
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,ArchiveHandler
,Serializable
public class TarArchiveHandler extends AbstractArchiveHandler
Offers access to tar files. Handles the following extensions: tar,tar.gz,tgz,tar.bz2
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-archive <adams.core.io.PlaceholderFile> (property: archive) The archive to obtain the files from. default: ${CWD}
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.gui.tools.previewbrowser.AbstractArchiveHandler
m_Archive, m_Relation
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description TarArchiveHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
doExtract(String archiveFile, File outFile)
Extracts the specified file and saves it locally.String[]
getExtensions()
Returns the list of extensions (without dot) that this handler can take care of.String
globalInfo()
Returns a string describing the object.protected String[]
listFiles()
Performs actual listing of files.-
Methods inherited from class adams.gui.tools.previewbrowser.AbstractArchiveHandler
archiveTipText, checkArchive, defineOptions, extract, getArchive, getFiles, getHandlers, getHandlersForFile, getHandlersForFile, getRelation, hasHandler, hasHandler, setArchive
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
getExtensions
public String[] getExtensions()
Returns the list of extensions (without dot) that this handler can take care of.- Returns:
- the array of extensions (no dot)
-
listFiles
protected String[] listFiles()
Performs actual listing of files.- Specified by:
listFiles
in classAbstractArchiveHandler
- Returns:
- the stored files
-
doExtract
protected boolean doExtract(String archiveFile, File outFile)
Extracts the specified file and saves it locally.- Specified by:
doExtract
in classAbstractArchiveHandler
- Parameters:
archiveFile
- the file in the archive to extractoutFile
- the local file to store the content in- Returns:
- true if successfully extracted
- See Also:
AbstractArchiveHandler.listFiles()
-
-