org.at4j.util.archive
Interface EntryExtractionStrategy

All Known Implementing Classes:
EntryExtractor, PrintingEntryExtractor

public interface EntryExtractionStrategy

This interface is implemented by different strategy objects that help the ArchiveExtractor to extract entries.

Since:
1.0
Author:
Karl Gustafsson

Method Summary
 Directory extractDirectory(ArchiveDirectoryEntry<?,?> dir, PotentialDirectory target, ExtractSpecification spec)
          Extract a directory entry to the target directory.
 void extractFile(ArchiveFileEntry<?,?> f, PotentialDirectory target, ExtractSpecification spec)
          Extract a file entry to the target directory.
 void extractSymbolicLink(ArchiveSymbolicLinkEntry<?,?> l, PotentialDirectory target, ExtractSpecification spec)
          Extract a symbolic link entry to the target directory.
 

Method Detail

extractDirectory

Directory extractDirectory(ArchiveDirectoryEntry<?,?> dir,
                           PotentialDirectory target,
                           ExtractSpecification spec)
Extract a directory entry to the target directory.

Parameters:
dir - The directory entry.
target - The target directory.
spec - The extraction specification.
Returns:
The new directory. If no directory was created as a result of this operation, null should be returned.

extractFile

void extractFile(ArchiveFileEntry<?,?> f,
                 PotentialDirectory target,
                 ExtractSpecification spec)
Extract a file entry to the target directory.

Parameters:
f - The file entry.
target - The target directory.
spec - The extraction specification.

extractSymbolicLink

void extractSymbolicLink(ArchiveSymbolicLinkEntry<?,?> l,
                         PotentialDirectory target,
                         ExtractSpecification spec)
Extract a symbolic link entry to the target directory.

Parameters:
l - The symbolic link entry.
target - The target directory.
spec - The extraction specification.