org.codehaus.plexus.archiver.tar

Class TarArchiver

public class TarArchiver extends AbstractArchiver

Version: $Revision: 3651 $ $Date: 2006-08-21 17:05:02 -0400 (Mon, 21 Aug 2006) $

Author: Emmanuel Venisse

Nested Class Summary
static classTarArchiver.TarCompressionMethod
Valid Modes for Compression attribute to Tar Task
classTarArchiver.TarOptions
Valid Modes for Compression attribute to Tar Task
Field Summary
TarArchiver.TarCompressionMethodcompression
TarLongFileModelongFileMode
booleanlongWarningGiven
Indicates whether the user has been warned about long files already.
TarArchiver.TarOptionsoptions
Method Summary
static booleancontainsFile(File file, Collection list)
voidcreateArchive()
TarArchiver.TarOptionsgetOptions()
booleanisSupportingForced()
voidsetCompression(TarArchiver.TarCompressionMethod mode)
Set compression method.
voidsetDefaultDirectoryMode(int mode)
Override AbstractArchiver.setDefaultDirectoryMode to update TarOptions.
voidsetDefaultFileMode(int mode)
Override AbstractArchiver.setDefaultFileMode to update TarOptions.
voidsetLongfile(TarLongFileMode mode)
Set how to handle long files, those with a path>100 chars.
voidsetOptions(TarArchiver.TarOptions options)
Set all tar options
protected voidtarFile(ArchiveEntry entry, TarOutputStream tOut, String vPath)
tar a file

Field Detail

compression

private TarArchiver.TarCompressionMethod compression

longFileMode

private TarLongFileMode longFileMode

longWarningGiven

private boolean longWarningGiven
Indicates whether the user has been warned about long files already.

options

private TarArchiver.TarOptions options

Method Detail

containsFile

private static boolean containsFile(File file, Collection list)

createArchive

public void createArchive()

getOptions

public TarArchiver.TarOptions getOptions()

isSupportingForced

public boolean isSupportingForced()

setCompression

public void setCompression(TarArchiver.TarCompressionMethod mode)
Set compression method. Allowable values are

Parameters: mode the compression method.

setDefaultDirectoryMode

public void setDefaultDirectoryMode(int mode)
Override AbstractArchiver.setDefaultDirectoryMode to update TarOptions.

setDefaultFileMode

public void setDefaultFileMode(int mode)
Override AbstractArchiver.setDefaultFileMode to update TarOptions.

setLongfile

public void setLongfile(TarLongFileMode mode)
Set how to handle long files, those with a path>100 chars. Optional, default=warn.

Allowable values are

Parameters: mode the mode to handle long file names.

setOptions

public void setOptions(TarArchiver.TarOptions options)
Set all tar options

Parameters: options options

tarFile

protected void tarFile(ArchiveEntry entry, TarOutputStream tOut, String vPath)
tar a file

Parameters: entry the file to tar tOut the output stream vPath the path name of the file to tar

Throws: IOException on error