Class Resource

All Implemented Interfaces:
Closeable, AutoCloseable

public class Resource extends FilterInputStream
This class represents a resolved resource. The type property is used by XGC to identify the resource content.
  • Constructor Details

    • Resource

      public Resource(String type, InputStream inputStream)
      Parameters:
      type - resource type
      inputStream - input stream of the resource
    • Resource

      public Resource(InputStream inputStream)
      Constructs a resource of 'unknown' type.
      Parameters:
      inputStream - input stream of the resource
  • Method Details

    • getType

      public String getType()
      Returns:
      the resource type