org.apache.myfaces.trinidad.share.io

## Interface InputStreamProvider

-     public interface InputStreamProvider

  InputStreamProviders encapsulate a single target file. An InputStreamProvider is used to get an inputStream, cache results and see if the file has been modified. (There's no real requirement that there be a physical file at the target location).

  Version:
    $Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/share/io/InputStreamProvider.java#0 $) $Date: 10-nov-2005.19:00:08 $

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getCachedResult()` Returns the cached result from reading and parsing this provider.
    `String` | `getDisplayName()` Returns the name of the target location, suitable for user display.
    `Object` | `getIdentifier()` Returns an identifier object that uniquely identifies the target location.
    `boolean` | `hasSourceChanged()` Returns true if the underlying target has changed since the last call to openInputStream()
    `InputStream` | `openInputStream()` Return an InputStream for the target.
    `void` | `setCachedResult(Object value)` Stores the cached result of reading and parsing this provider.

- - ### Method Detail

    - #### openInputStream

          InputStream openInputStream()
                                      throws IOException

      Return an InputStream for the target. This function should never return null - if a stream cannot be opened, throw an IOException.
      Throws:
        `IOException`

    - #### getDisplayName

          String getDisplayName()

      Returns the name of the target location, suitable for user display.

    - #### getIdentifier

          Object getIdentifier()

      Returns an identifier object that uniquely identifies the target location. If two providers return equal identifiers, that is, given:

             Object identifierA = providerA.getIdentifier();
             Object identifierB = providerB.getIdentifier();

      ... then:

             if (identifierA.equals(identifierB)) ...

      then the two providers must point to the same location.

    - #### hasSourceChanged

          boolean hasSourceChanged()

      Returns true if the underlying target has changed since the last call to openInputStream()

    - #### getCachedResult

          Object getCachedResult()

      Returns the cached result from reading and parsing this provider.
      See Also:
        `CachingNameResolver`

    - #### setCachedResult

          void setCachedResult(Object value)

      Stores the cached result of reading and parsing this provider.
      See Also:
        `CachingNameResolver`

Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.