net.officefloor.plugin.servlet.resource
Interface ResourceLocator

All Known Implementing Classes:
ClassPathResourceLocator, FileSystemResourceLocator

public interface ResourceLocator

Locator of resources.

Author:
Daniel Sagenschneider

Method Summary
 URL getResource(String resourcePath)
          Obtains the URL for the resource.
 InputStream getResourceAsStream(String resourcePath)
          Obtains the InputStream to the contents of the resource.
 Set<String> getResourceChildren(String resourcePath)
          Obtains the direct children for the resource.
 

Method Detail

getResourceChildren

Set<String> getResourceChildren(String resourcePath)
Obtains the direct children for the resource.

Parameters:
resourcePath - Path to the resource.
Returns:
Direct children for the resource.

getResource

URL getResource(String resourcePath)
                throws MalformedURLException
Obtains the URL for the resource.

Parameters:
resourcePath - Path to the resource.
Returns:
URL to the resource or null if no resource at path.
Throws:
MalformedURLException - If resource path is malformed.

getResourceAsStream

InputStream getResourceAsStream(String resourcePath)
Obtains the InputStream to the contents of the resource.

Parameters:
resourcePath - Path to the resource.
Returns:
InputStream to the contents of the resource or null if no resource at path.


Copyright © 2005-2012. All Rights Reserved.