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()
Asset
is to be viewed as a logical path (placeholder/directory) only with no
backing content.openStream
in interface Asset
InputStream
for each call, or null if this type simply represents a logical path
within an Archive
Asset.openStream()
public Archive<?> getArchive()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.