Package org.apache.tiles.request

# Interface ApplicationResource

All Known Implementing Classes:
  `PostfixedApplicationResource`, `StrutsApplicationResource`, `URLApplicationResource`

public interface ApplicationResource
A (localized) resource accessible through the ApplicationContext. Typically, this is a file inside the web application's war.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `InputStream`
  `getInputStream()`
  Get a java.io.InputStream to read the contents of this resource.
  `long`
  `getLastModified()`
  Get the last modification date for this resource.
  `Locale`
  `getLocale()`
  Get the Locale for this resource.
  `String`
  `getLocalePath()`
  Get the path name for this resource.
  `String`
  `getLocalePath(Locale locale)`
  Get the path name of another version of the resource.
  `String`
  `getPath()`
  Get the path name for this resource.

- ## Method Details

  - ### getLocalePath

    String getLocalePath()
    Get the path name for this resource. You can access this resource by passing the path to `getResource`.
    Returns:
      the path including localization.

  - ### getPath

    String getPath()
    Get the path name for this resource. Multiple versions of a resource can share the same path if the locale part is different.
    Returns:
      the path excluding localization.

  - ### getLocale

    Locale getLocale()
    Get the Locale for this resource.
    Returns:
      the Locale.

  - ### getLocalePath

    String getLocalePath(Locale locale)
    Get the path name of another version of the resource.
    Parameters:
      `locale` - the Locale for the new version.
    Returns:
      the path including localization.

  - ### getInputStream

    InputStream getInputStream() throws IOException
    Get a java.io.InputStream to read the contents of this resource.
    Returns:
      the InputStream.
    Throws:
      `IOException` - if the contents cannot be read.

  - ### getLastModified

    long getLastModified() throws IOException
    Get the last modification date for this resource.
    Returns:
      the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
    Throws:
      `IOException` - if the last modification date cannot be found.