com.epam.common.resourceloader
Class HomeDirResourceLoader

java.lang.Object
  extended by com.epam.common.resourceloader.HomeDirResourceLoader
All Implemented Interfaces:
ResourceLoader

public class HomeDirResourceLoader
extends Object
implements ResourceLoader

Looking for resource in user home directory.


Field Summary
protected static String USER_HOME
           
 
Fields inherited from interface com.epam.common.resourceloader.ResourceLoader
DEFAULT_LOADER
 
Constructor Summary
HomeDirResourceLoader()
          Create the HomeDirResourceLoader.
HomeDirResourceLoader(ResourceLoader loader)
          Create resource loader.
 
Method Summary
 InputStream loadResource(String resourceName)
          Method to load resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_HOME

protected static final String USER_HOME
See Also:
Constant Field Values
Constructor Detail

HomeDirResourceLoader

public HomeDirResourceLoader()
Create the HomeDirResourceLoader. The parent loader is DummyResourceLoader.


HomeDirResourceLoader

public HomeDirResourceLoader(ResourceLoader loader)
Create resource loader.

Parameters:
loader - the parent loader
Method Detail

loadResource

public InputStream loadResource(String resourceName)
                         throws ResourceNotFoundException
Description copied from interface: ResourceLoader
Method to load resource.

Specified by:
loadResource in interface ResourceLoader
Parameters:
resourceName - the resource name
Returns:
InputStream by opening a connection to a Resource specified
Throws:
ResourceNotFoundException - if resource not found and no parent ResrourceLoader available
See Also:
ResourceLoader.loadResource(String)


Copyright © 2000-2014 EPAM Systems. All Rights Reserved.