org.richfaces.resource

## Class URLResource

- java.lang.Object
- - javax.faces.application.Resource
  - - org.richfaces.resource.URLResource

-     public class URLResource
      extends javax.faces.application.Resource

  Implementation of `Resource` which serves resources from absolute path.

  Thus it does provide only `getRequestPath()` method, all other methods throws `UnsupportedOperationException`.

  Author:
    Lukas Fryc

- - ### Field Summary

    - ### Fields inherited from class javax.faces.application.Resource

      `COMPONENT_RESOURCE_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `URLResource(ResourcePath resourcePath)`
    `URLResource(URL url)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `InputStream` | `getInputStream()`
    `String` | `getLibraryName()`
    `String` | `getRequestPath()`
    `String` | `getResourceName()`
    `Map<String,String>` | `getResponseHeaders()`
    `URL` | `getURL()`
    `boolean` | `userAgentNeedsUpdate(javax.faces.context.FacesContext context)`

    - ### Methods inherited from class javax.faces.application.Resource

      `getContentType, setContentType, setLibraryName, setResourceName, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### URLResource

          public URLResource(ResourcePath resourcePath)

    - #### URLResource

          public URLResource(URL url)

  - ### Method Detail

    - #### getRequestPath

          public String getRequestPath()

      Specified by:
        `getRequestPath` in class `javax.faces.application.Resource`

    - #### getURL

          public URL getURL()

      Specified by:
        `getURL` in class `javax.faces.application.Resource`

    - #### getInputStream

          public InputStream getInputStream()
                                     throws IOException

      Specified by:
        `getInputStream` in class `javax.faces.application.Resource`
      Throws:
        `IOException`

    - #### getResponseHeaders

          public Map<String,String> getResponseHeaders()

      Specified by:
        `getResponseHeaders` in class `javax.faces.application.Resource`

    - #### userAgentNeedsUpdate

          public boolean userAgentNeedsUpdate(javax.faces.context.FacesContext context)

      Specified by:
        `userAgentNeedsUpdate` in class `javax.faces.application.Resource`

    - #### getLibraryName

          public String getLibraryName()

      Overrides:
        `getLibraryName` in class `javax.faces.application.Resource`

    - #### getResourceName

          public String getResourceName()

      Overrides:
        `getResourceName` in class `javax.faces.application.Resource`

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.