Resource
Date: 2016-04-28

org.apache.xmlgraphics.io

## Class Resource

- java.lang.Object
- - java.io.InputStream
  - - java.io.FilterInputStream
    - - org.apache.xmlgraphics.io.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 and Description
    `Resource(java.io.InputStream inputStream)` Constructs a resource of 'unknown' type.
    `Resource(java.lang.String type, java.io.InputStream inputStream)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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.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