de.esprit.appsuite.io.archive.tar

## Class TarExtractor<C extends ApplicationContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.appsuite.task.AbstractAsyncExecutable<C>
      - - de.esprit.appsuite.io.archive.AbstractArchiveExtractor<C,TarArchiveEntry>
        - - de.esprit.appsuite.io.archive.tar.TarExtractor<C>

- All Implemented Interfaces:
    ApplicationObject<C>, AsyncExecutable<C>, CancellableTask, TaskMonitorSupport, SimpleLogSupport, Dumpable, Executable
  Direct Known Subclasses:
    TarLister

      public class TarExtractor<C extends ApplicationContext>
      extends AbstractArchiveExtractor<C,TarArchiveEntry>

  This class extracts the content of a zip archive into a given target-directory. Note that any progress notification is done by an attached `ProgressInputStream`.
  Author:
    Rainer Buesch

- - ### Field Summary

    - ### Fields inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `childTaskRef, isTestMode, monitorController, resultRef, stateFlag`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TarExtractor(C ctx, java.io.File targetDir)`
    `TarExtractor(C ctx, java.io.File targetDir, java.io.File archiveFile, ArchiveEntryFilter filter)`
    `TarExtractor(C ctx, LogChannel logCh, java.io.File targetDir)`
    `TarExtractor(C ctx, LogChannel logCh, java.io.File targetDir, java.io.File archiveFile)`
    `TarExtractor(C ctx, LogChannel logCh, java.io.File targetDir, java.io.File archiveFile, ArchiveEntryFilter filter)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected FileType` | `getArchiveType()`
    `ProgressInputStream` | `getProgressInputStream()`
    `protected void` | `processArchive()`
    `void` | `setInputStream(java.io.InputStream inStream, FileInfo info)` Sets the input stream to be read.
    `void` | `setInputStream(ProgressInputStream inStream)`

    - ### Methods inherited from class de.esprit.appsuite.io.archive.AbstractArchiveExtractor

      `checkStreamAccess, createOutputStream, displayArchiveEntry, displayHeader, doOnDirectoryCreated, doOnFileCreated, doOnFileCreating, executeAsync, extractAsDirectory, extractToFile, getInputFile, getTargetDir, isShouldExtract, setExtractionFilter, setInputFile, setTargetDir`

    - ### Methods inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `addMonitor, checkCancelled, checkForErrorAndRethrow, clearMonitors, createRunStateFlag, doOnCancel, doOnFailure, execute, executeSubTask, getError, getMaxProgressSteps, getMonitorCount, getMonitors, getName, getProgressStepCount, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, handleFinish, handleStart, handleSuccess, hasError, hasMonitor, isCancellable, notifyProceeded, registerTaskStateChange, removeMonitor, resetProgress, setCancellable, setLogLevel, setMaxProgressSteps, setMonitor, setName, setName, setResult, setRunStateFlag, setTaskId, setType, shouldFireMonitor, sleepChecked, wasCancelled`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface de.esprit.appsuite.launch.ApplicationObject

      `getApplicationContext`

    - ### Methods inherited from interface de.esprit.common.log.SimpleLogSupport

      `getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

- - ### Constructor Detail

    - #### TarExtractor

          public TarExtractor(C ctx,
                      java.io.File targetDir)

    - #### TarExtractor

          public TarExtractor(C ctx,
                      LogChannel logCh,
                      java.io.File targetDir)

    - #### TarExtractor

          public TarExtractor(C ctx,
                      LogChannel logCh,
                      java.io.File targetDir,
                      java.io.File archiveFile)

    - #### TarExtractor

          public TarExtractor(C ctx,
                      java.io.File targetDir,
                      java.io.File archiveFile,
                      ArchiveEntryFilter filter)

    - #### TarExtractor

          public TarExtractor(C ctx,
                      LogChannel logCh,
                      java.io.File targetDir,
                      java.io.File archiveFile,
                      ArchiveEntryFilter filter)

  - ### Method Detail

    - #### getArchiveType

          protected final FileType getArchiveType()

      Specified by:
        `getArchiveType` in class `AbstractArchiveExtractor<C extends ApplicationContext,TarArchiveEntry>`

    - #### setInputStream

          public void setInputStream(java.io.InputStream inStream,
                            FileInfo info)

      Sets the input stream to be read. The content of the stream must be zipped data.

    - #### setInputStream

          public void setInputStream(ProgressInputStream inStream)

    - #### processArchive

          protected void processArchive()
                                 throws java.lang.Exception

      Specified by:
        `processArchive` in class `AbstractArchiveExtractor<C extends ApplicationContext,TarArchiveEntry>`
      Throws:
        `java.lang.Exception`

    - #### getProgressInputStream

          public ProgressInputStream getProgressInputStream()

Copyright © 2014 EsprIT-Systems. All Rights Reserved.