de.esprit.appsuite.io.archive.tar

## Class TarArchiver<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.AbstractArchiver<C>
        - - de.esprit.appsuite.io.archive.tar.TarArchiver<C>

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

      public class TarArchiver<C extends ApplicationContext>
      extends AbstractArchiver<C>
      implements TarProgressDisplay

  This class creates a TAR archive from either files or directories.
  Author:
    Rainer Buesch

- - ### Field Summary

    - ### Fields inherited from class de.esprit.appsuite.io.archive.AbstractArchiver

      `measureStream`

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

      `childTaskRef, isTestMode, monitorController, resultRef, stateFlag`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TarArchiver(C ctx)`
    `TarArchiver(C ctx, ArchiveInputList inputList)`
    `TarArchiver(C ctx, java.io.File tarOutFile)`
    `TarArchiver(C ctx, java.io.File tarOutFile, ArchiveInputList inputList)`
    `TarArchiver(C ctx, LogChannel logCh, java.io.File tarOutFile, ArchiveInputList inputList)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.io.OutputStream` | `createOutputStream(java.io.File archiveFile)`
    `FileType` | `getArchiveType()`
    `protected void` | `processArchiving(java.io.File archiveFile, ArchiveInputList inputList)`
    `void` | `showTarProgressMessage(java.lang.String msg)` Display a progress message.

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

      `addDirectory, addDirectory, addFile, addFiles, checkDirectoryExists, checkFileExists, checkHasArchivedFiles, createCleanupFileOutputStream, doOnAddingArchiveEntry, executeAsync, getSourceRootDir, incrementArchivedFileCount, setArchiveFile, setRemoveSourceFiles, setRootDirectory, setSourceRootDir`

    - ### 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

    - #### TarArchiver

          public TarArchiver(C ctx)

    - #### TarArchiver

          public TarArchiver(C ctx,
                     java.io.File tarOutFile)

    - #### TarArchiver

          public TarArchiver(C ctx,
                     ArchiveInputList inputList)

    - #### TarArchiver

          public TarArchiver(C ctx,
                     java.io.File tarOutFile,
                     ArchiveInputList inputList)

    - #### TarArchiver

          public TarArchiver(C ctx,
                     LogChannel logCh,
                     java.io.File tarOutFile,
                     ArchiveInputList inputList)

  - ### Method Detail

    - #### createOutputStream

          protected java.io.OutputStream createOutputStream(java.io.File archiveFile)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getArchiveType

          public FileType getArchiveType()

      Specified by:
        `getArchiveType` in class `AbstractArchiver<C extends ApplicationContext>`

    - #### processArchiving

          protected void processArchiving(java.io.File archiveFile,
                              ArchiveInputList inputList)
                                   throws java.lang.Exception

      Specified by:
        `processArchiving` in class `AbstractArchiver<C extends ApplicationContext>`
      Throws:
        `java.lang.Exception`

    - #### showTarProgressMessage

          public final void showTarProgressMessage(java.lang.String msg)

      Description copied from interface: `TarProgressDisplay`
      Display a progress message.
      Specified by:
        `showTarProgressMessage` in interface `TarProgressDisplay`
      Parameters:
        `msg` - The message to display.

Copyright © 2014 EsprIT-Systems. All Rights Reserved.