Class ArchiveAsset
java.lang.Object
org.jboss.shrinkwrap.api.asset.ArchiveAsset
- All Implemented Interfaces:
Asset
An
Asset representing an Archive; a specified StreamExporter type will be used to fulfill the
Asset.openStream() contract.- Version:
- $Revision: $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Archive<?> The archive this asset representsprivate final Class<? extends StreamExporter> Exporter used to represent this archive as aInputStream -
Constructor Summary
ConstructorsConstructorDescriptionArchiveAsset(Archive<?> archive, Class<? extends StreamExporter> exporter) Creates a new instance wrapping the specifiedArchive, which will use the specifiedStreamExporterto represent the archive as anInputStreaminAsset.openStream(). -
Method Summary
Modifier and TypeMethodDescriptionArchive<?> Returns the archive this asset representsGet a input stream for the resource content.
-
Field Details
-
archive
The archive this asset represents -
exporter
Exporter used to represent this archive as aInputStream
-
-
Constructor Details
-
ArchiveAsset
Creates a new instance wrapping the specifiedArchive, which will use the specifiedStreamExporterto represent the archive as anInputStreaminAsset.openStream().- Parameters:
archive-exporter-- Throws:
IllegalArgumentException- If either argument is not specified
-
-
Method Details
-
openStream
Get a input stream for the resource content. The caller is responsible for closing the stream.- Specified by:
openStreamin interfaceAsset- Returns:
- A new open
InputStreamfor each call - See Also:
-
getArchive
-