public class ArchiveAsset extends java.lang.Object implements Asset
Asset
representing an Archive
; a specified StreamExporter
type will be used to fulfill the
Asset.openStream()
contract.Modifier and Type | Field and Description |
---|---|
private Archive<?> |
archive
The archive this asset represents
|
private java.lang.Class<? extends StreamExporter> |
exporter
Exporter used to represent this archive as a
InputStream |
Constructor and Description |
---|
ArchiveAsset(Archive<?> archive,
java.lang.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
|
java.io.InputStream |
openStream()
Get a input stream for the resource content.
|
private final Archive<?> archive
private final java.lang.Class<? extends StreamExporter> exporter
InputStream
public ArchiveAsset(Archive<?> archive, java.lang.Class<? extends StreamExporter> exporter)
Archive
, which will use the specified
StreamExporter
to represent the archive as an InputStream
in Asset.openStream()
.archive
- exporter
- java.lang.IllegalArgumentException
- If either argument is not specifiedpublic java.io.InputStream openStream()
openStream
in interface Asset
InputStream
for each callAsset.openStream()
public Archive<?> getArchive()