Class ArchiveAsset

    • Field Summary

      Fields 
      Modifier and Type Field 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Archive<?> getArchive()
      Returns the archive this asset represents
      java.io.InputStream openStream()
      Get a input stream for the resource content.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • archive

        private final Archive<?> archive
        The archive this asset represents
      • exporter

        private final java.lang.Class<? extends StreamExporter> exporter
        Exporter used to represent this archive as a InputStream
    • Constructor Detail

      • ArchiveAsset

        public 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().
        Parameters:
        archive -
        exporter -
        Throws:
        java.lang.IllegalArgumentException - If either argument is not specified
    • Method Detail

      • openStream

        public java.io.InputStream openStream()
        Get a input stream for the resource content. The caller is responsible for closing the stream.
        Specified by:
        openStream in interface Asset
        Returns:
        A new open InputStream for each call
        See Also:
        Asset.openStream()
      • getArchive

        public Archive<?> getArchive()
        Returns the archive this asset represents
        Returns: