adams.gui.tools.previewbrowser
Class TarArchiveHandler
java.lang.Object
adams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.gui.tools.previewbrowser.AbstractArchiveHandler
adams.gui.tools.previewbrowser.TarArchiveHandler
- All Implemented Interfaces:
- Debuggable, Destroyable, OptionHandler, SizeOfHandler, 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}
- Version:
- $Revision: 4584 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
|
Method Summary |
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, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString |
TarArchiveHandler
public TarArchiveHandler()
globalInfo
public String globalInfo()
- Returns a string describing the object.
- Specified by:
globalInfo in class AbstractOptionHandler
- 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.
- Specified by:
getExtensions in class AbstractArchiveHandler
- Returns:
- the list of extensions (no dot)
listFiles
protected String[] listFiles()
- Performs actual listing of files.
- Specified by:
listFiles in class AbstractArchiveHandler
- Returns:
- the stored files
doExtract
protected boolean doExtract(String archiveFile,
File outFile)
- Extracts the specified file and saves it locally.
- Specified by:
doExtract in class AbstractArchiveHandler
- Parameters:
archiveFile - the file in the archive to extractoutFile - the local file to store the content in
- Returns:
- true if successfully extracted
Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.