org.at4j.tar
Class PrintTarEntryExtractionStrategy
java.lang.Object
org.at4j.tar.PrintTarEntryExtractionStrategy
- All Implemented Interfaces:
- TarEntryExtractionStrategy
public class PrintTarEntryExtractionStrategy
- extends Object
- implements TarEntryExtractionStrategy
This extraction strategy can be used with the TarExtractor
to just
print the contents of the Tar file.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
TarExtractor
,
TarExtractSpecification
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrintTarEntryExtractionStrategy
public PrintTarEntryExtractionStrategy(PrintStream out)
- Create a printing strategy that will print to the supplied stream.
- Parameters:
out
- The stream to print to.
extract
public void extract(TarEntryHeaderData headerData,
DataSource src,
Directory targetRoot,
TarExtractSpecification spec)
throws WrappedIOException,
TarFileParseException
- Description copied from interface:
TarEntryExtractionStrategy
- Extract the current Tar entry.
- Specified by:
extract
in interface TarEntryExtractionStrategy
- Parameters:
headerData
- The Tar entry's header data.src
- The data source. When this method is called, the data source
is positioned at the start of the entry data, at a Tar block start. When
this method exits, it should be positioned at the next Tar block start,
after the entry data.targetRoot
- The root directory of the extraction target directory
hierarchy.spec
- The specification for the extraction operation.
- Throws:
WrappedIOException
- On I/O errors.
TarFileParseException
- If the extraction strategy does not know
how to deal with the entry.