Class Resource

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class Resource
    extends java.io.FilterInputStream
    This class represents a resolved resource. The type property is used by XGC to identify the resource content.
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      Resource​(java.io.InputStream inputStream)
      Constructs a resource of 'unknown' type.
      Resource​(java.lang.String type, java.io.InputStream inputStream)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getType()  
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, markSupported, read, read, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

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

      • Resource

        public Resource​(java.lang.String type,
                        java.io.InputStream inputStream)
        Parameters:
        type - resource type
        inputStream - input stream of the resource
      • Resource

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

      • getType

        public java.lang.String getType()
        Returns:
        the resource type