org.apache.tiles.request.locale
Class URLApplicationResource

Package class diagram package URLApplicationResource
java.lang.Object
  extended by org.apache.tiles.request.locale.PostfixedApplicationResource
      extended by org.apache.tiles.request.locale.URLApplicationResource
All Implemented Interfaces:
ApplicationResource

public class URLApplicationResource
extends PostfixedApplicationResource

A PostfixedApplicationResource that can be accessed through a URL.

Version:
$Rev$ $Date$

Constructor Summary
URLApplicationResource(String path, Locale locale, URL url)
          Creates a URLApplicationResource for the specified path that can be accessed through the specified URL.
URLApplicationResource(String localePath, URL url)
          Creates a URLApplicationResource for the specified path that can be accessed through the specified URL.
 
Method Summary
 InputStream getInputStream()
          Get a java.io.InputStream to read the contents of this resource.
 long getLastModified()
          Get the last modification date for this resource.
 String toString()
          
 
Methods inherited from class org.apache.tiles.request.locale.PostfixedApplicationResource
equals, getLocale, getLocalePath, getLocalePath, getPath, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URLApplicationResource

public URLApplicationResource(String localePath,
                              URL url)
Creates a URLApplicationResource for the specified path that can be accessed through the specified URL.

Parameters:
localePath - the path including localization.
url - the URL where the contents can be found.

URLApplicationResource

public URLApplicationResource(String path,
                              Locale locale,
                              URL url)
                       throws MalformedURLException
Creates a URLApplicationResource for the specified path that can be accessed through the specified URL.

Parameters:
path - the path excluding localization.
locale - the Locale.
url - the URL where the contents can be found.
Throws:
MalformedURLException
Method Detail

getInputStream

public 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

public 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.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2001-2012 Apache Software Foundation. All Rights Reserved.