Interface StreamImporter<I extends StreamImporter<I>>
-
- Type Parameters:
I- Concrete type used in covariant return
- All Superinterfaces:
Assignable
- All Known Subinterfaces:
TarBz2Importer,TarGzImporter,TarImporter,ZipImporter
- All Known Implementing Classes:
TarBz2ImporterImpl,TarGzImporterImpl,TarImporterBase,TarImporterImpl,ZipImporterImpl
public interface StreamImporter<I extends StreamImporter<I>> extends Assignable
Generic importer capable of representing anAssignableas an entity capable of reading from anInputStream, or file type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IimportFrom(java.io.File file)Imports provided File as aArchive.IimportFrom(java.io.File file, Filter<ArchivePath> filter)Imports provided File as aArchive.IimportFrom(java.io.InputStream stream)Imports provided stream as aArchive.IimportFrom(java.io.InputStream stream, Filter<ArchivePath> filter)Imports provided stream as aArchive.-
Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
-
-
-
-
Method Detail
-
importFrom
I importFrom(java.io.InputStream stream) throws ArchiveImportException
Imports provided stream as aArchive. It remains the responsibility of the caller to close the stream.- Parameters:
stream- the stream to import; should be a raw type, not wrapped in any implementation-specific encoding (ie.FileInputStreamis appropriate, butZipInputStreamorGZIPInputStreamis not).- Returns:
- Archive of the imported stream
- Throws:
ArchiveImportException- If an error occurred during the import processjava.lang.IllegalArgumentException- If no stream is specified
-
importFrom
I importFrom(java.io.InputStream stream, Filter<ArchivePath> filter) throws ArchiveImportException
Imports provided stream as aArchive. It remains the responsibility of the caller to close the stream.- Parameters:
stream- the stream to import; should be a raw type, not wrapped in any implementation-specific encoding (ie.FileInputStreamis appropriate, butZipInputStreamorGZIPInputStreamis not).filter- Filter to match result- Returns:
- Archive of the imported stream
- Throws:
ArchiveImportException- If an error occurred during the import processjava.lang.IllegalArgumentException- If no stream is specified
-
importFrom
I importFrom(java.io.File file) throws ArchiveImportException
Imports provided File as aArchive.- Parameters:
file- the file to import- Returns:
- Archive of the imported file
- Throws:
ArchiveImportException- If an error occurred during the import processjava.lang.IllegalArgumentException- If no file is specified or if the file is a directory
-
importFrom
I importFrom(java.io.File file, Filter<ArchivePath> filter) throws ArchiveImportException
Imports provided File as aArchive.- 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 processjava.lang.IllegalArgumentException- If no file is specified or if the file is a directory
-
-