org.apache.commons.compress.archivers.tar
Class TarArchive

java.lang.Object
  extended by org.apache.commons.compress.PackableObject
      extended by org.apache.commons.compress.AbstractArchive
          extended by org.apache.commons.compress.archivers.tar.TarArchive
All Implemented Interfaces:
org.apache.commons.compress.Archive

public class TarArchive
extends org.apache.commons.compress.AbstractArchive

Archive-Implementation for Tar. An tar archive has no header. This means, that the ArchiverFactory.getInstance( new File("file.tar")) Method cannot be used.


Field Summary
private static java.lang.String ARCHIVER_NAME
          ARCHIVER_NAME Field for this archiver.
private static int BUFFER
           
static java.lang.String DEFAULT_FILE_EXTENSION
          DEFAULT_FILE_EXTENSION Field for this archiver.
 
Fields inherited from class org.apache.commons.compress.PackableObject
CHOOSE_EXTENSION, CHOOSE_NAME
 
Constructor Summary
TarArchive()
          This Archive should be instantiated in the Archive-Interface.
 
Method Summary
 void doSave(java.io.FileOutputStream output)
           
protected  void doUnpack(java.io.File unpackDir)
           
 java.lang.String getDefaultFileExtension()
           
 byte[] getHeader()
           
 java.lang.String getName()
           
 
Methods inherited from class org.apache.commons.compress.AbstractArchive
add, add, close, getArchive, getEntryIterator, newInstance, save, save, setArchive, unpack
 
Methods inherited from class org.apache.commons.compress.PackableObject
identifyByHeader, isPackableWith
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER

private static final int BUFFER
See Also:
Constant Field Values

DEFAULT_FILE_EXTENSION

public static final java.lang.String DEFAULT_FILE_EXTENSION
DEFAULT_FILE_EXTENSION Field for this archiver.

See Also:
Constant Field Values

ARCHIVER_NAME

private static final java.lang.String ARCHIVER_NAME
ARCHIVER_NAME Field for this archiver.

See Also:
Constant Field Values
Constructor Detail

TarArchive

public TarArchive()
This Archive should be instantiated in the Archive-Interface.

Method Detail

doUnpack

protected void doUnpack(java.io.File unpackDir)
                 throws org.apache.commons.compress.UnpackException
Specified by:
doUnpack in class org.apache.commons.compress.AbstractArchive
Throws:
org.apache.commons.compress.UnpackException

doSave

public void doSave(java.io.FileOutputStream output)
            throws org.apache.commons.compress.ArchiveException
Specified by:
doSave in class org.apache.commons.compress.AbstractArchive
Throws:
org.apache.commons.compress.ArchiveException

getName

public java.lang.String getName()
Specified by:
getName in class org.apache.commons.compress.PackableObject

getDefaultFileExtension

public java.lang.String getDefaultFileExtension()
Specified by:
getDefaultFileExtension in class org.apache.commons.compress.PackableObject

getHeader

public byte[] getHeader()
Specified by:
getHeader in class org.apache.commons.compress.PackableObject