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 a 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
- exporter
- IllegalArgumentException
- If either argument is not specifiedpublic InputStream openStream()
openStream
in interface Asset
InputStream
for each callAsset.openStream()
public Archive<?> getArchive()
Copyright © 2016 JBoss by Red Hat. All rights reserved.