public class ArchiveAsset extends Object implements Asset
Asset representing an Archive; a specified StreamExporter type will be used to fulfill the
Asset.openStream() contract.| Constructor and Description |
|---|
ArchiveAsset(Archive<?> archive,
Class<? extends StreamExporter> exporter)
Creates a new instance wrapping the specified
Archive, which will use the specified
StreamExporter to represent the archive as an InputStream in Asset.openStream(). |
| Modifier and Type | Method and Description |
|---|---|
Archive<?> |
getArchive()
Returns the archive this asset represents
|
InputStream |
openStream()
Get an input stream for the resource content.
|
public ArchiveAsset(Archive<?> archive, Class<? extends StreamExporter> exporter)
Archive, which will use the specified
StreamExporter to represent the archive as an InputStream in Asset.openStream().archive - The Archive to wrap. Must not be null.exporter - The StreamExporter class used to export the archive as an InputStream.
Must not be null.IllegalArgumentException - If either argument is not specifiedpublic InputStream openStream()
openStream in interface AssetInputStream for each callAsset.openStream()public Archive<?> getArchive()
Copyright © 2024 JBoss by Red Hat. All rights reserved.