Class TarBz2ImporterImpl
- java.lang.Object
-
- org.jboss.shrinkwrap.impl.base.AssignableBase<Archive<?>>
-
- org.jboss.shrinkwrap.impl.base.importer.tar.TarBz2ImporterImpl
-
- All Implemented Interfaces:
Assignable
,StreamImporter<TarBz2Importer>
,TarBz2Importer
public class TarBz2ImporterImpl extends AssignableBase<Archive<?>> implements TarBz2Importer
Used to import existing TAR.BZ2 files/streams into the givenArchive
- Author:
- ALR, Tair Sabirgaliev
-
-
Constructor Summary
Constructors Constructor Description TarBz2ImporterImpl(Archive<?> archive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description I
importFrom(File file)
Imports provided File as aArchive
.I
importFrom(File file, Filter<ArchivePath> filter)
Imports provided File as aArchive
.I
importFrom(InputStream stream)
Imports provided stream as aArchive
.I
importFrom(InputStream stream, Filter<ArchivePath> filter)
Imports provided stream as aArchive
.-
Methods inherited from class org.jboss.shrinkwrap.impl.base.AssignableBase
as, getArchive
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
-
Methods inherited from interface org.jboss.shrinkwrap.api.importer.StreamImporter
importFrom, importFrom, importFrom, importFrom
-
-
-
-
Constructor Detail
-
TarBz2ImporterImpl
public TarBz2ImporterImpl(Archive<?> archive)
-
-
Method Detail
-
importFrom
public I importFrom(InputStream stream) throws ArchiveImportException
Imports provided stream as aArchive
. It remains the responsibility of the caller to close the stream.- Specified by:
importFrom
in interfaceStreamImporter<S extends TarInputStream>
- Parameters:
stream
- the stream to import; should be a raw type, not wrapped in any implementation-specific encoding (ie.FileInputStream
is appropriate, butZipInputStream
orGZIPInputStream
is not).- Returns:
- Archive of the imported stream
- Throws:
ArchiveImportException
- If an error occurred during the import process- See Also:
StreamImporter.importFrom(java.io.InputStream)
-
importFrom
public I importFrom(InputStream stream, Filter<ArchivePath> filter) throws ArchiveImportException
Imports provided stream as aArchive
. It remains the responsibility of the caller to close the stream.- Specified by:
importFrom
in interfaceStreamImporter<S extends TarInputStream>
- Parameters:
stream
- the stream to import; should be a raw type, not wrapped in any implementation-specific encoding (ie.FileInputStream
is appropriate, butZipInputStream
orGZIPInputStream
is not).filter
- Filter to match result- Returns:
- Archive of the imported stream
- Throws:
ArchiveImportException
- If an error occurred during the import process- See Also:
StreamImporter.importFrom(java.io.InputStream, Filter)
-
importFrom
public I importFrom(File file) throws ArchiveImportException
Imports provided File as aArchive
.- Specified by:
importFrom
in interfaceStreamImporter<S extends TarInputStream>
- Parameters:
file
- the file to import- Returns:
- Archive of the imported file
- Throws:
ArchiveImportException
- If an error occurred during the import process- See Also:
StreamImporter.importFrom(java.io.File)
-
importFrom
public I importFrom(File file, Filter<ArchivePath> filter) throws ArchiveImportException
Imports provided File as aArchive
.- Specified by:
importFrom
in interfaceStreamImporter<S extends TarInputStream>
- Parameters:
file
- the file to importfilter
- Filter to match result- Returns:
- Archive of the imported file
- Throws:
ArchiveImportException
- If an error occurred during the import process- See Also:
StreamImporter.importFrom(java.io.File, Filter)
-
-