Class CombinedResourceInputStream

java.lang.Object
java.io.InputStream
org.omnifaces.resourcehandler.CombinedResourceInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public final class CombinedResourceInputStream extends InputStream

This InputStream implementation takes care that all in the constructor given resources are been read in sequence.

Author:
Bauke Scholtz
  • Constructor Details

    • CombinedResourceInputStream

      public CombinedResourceInputStream(Set<Resource> resources, String contentType) throws IOException
      Creates an instance of CombinedResourceInputStream based on the given resources. For each resource, the InputStream will be obtained and hold in an iterable collection.
      Parameters:
      resources - The resources to be read.
      contentType - The content type of the combined resource; must not be null. When this is a JavaScript type (ending in /javascript), "use strict" directives will be stripped from the preamble of each resource to prevent them from ending up in the middle of the combined output.
      Throws:
      NullPointerException - When content type is null.
      IOException - If something fails at I/O level.
  • Method Details