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
Generic importer capable of representing an
Assignable
as an entity capable of reading from an
InputStream
, or file type.-
Method Summary
Modifier and TypeMethodDescriptionimportFrom
(File file) Imports provided File as aArchive
.importFrom
(File file, Filter<ArchivePath> filter) Imports provided File as aArchive
.importFrom
(InputStream stream) Imports provided stream as aArchive
.importFrom
(InputStream stream, Filter<ArchivePath> filter) Imports provided stream as aArchive
.Methods inherited from interface org.jboss.shrinkwrap.api.Assignable
as
-
Method Details
-
importFrom
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.FileInputStream
is appropriate, butZipInputStream
orGZIPInputStream
is not).- Returns:
- Archive of the imported stream
- Throws:
ArchiveImportException
- If an error occurred during the import processIllegalArgumentException
- If no stream is specified
-
importFrom
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.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 processIllegalArgumentException
- If no stream is specified
-
importFrom
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 processIllegalArgumentException
- If no file is specified or if the file is a directory
-
importFrom
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 processIllegalArgumentException
- If no file is specified or if the file is a directory
-