com.epam.common.resourceloader
Interface ResourceLoader

All Known Implementing Classes:
ClassPathResourceLoader, CurrentDirResourceLoader, HomeDirResourceLoader

public interface ResourceLoader

Standard interface to implement by every ResourceLoader strategy.


Field Summary
static ResourceLoader DEFAULT_LOADER
          Default ResourceLoader looking for resources in following order: 1.
 
Method Summary
 InputStream loadResource(String resourceName)
          Method to load resource.
 

Field Detail

DEFAULT_LOADER

static final ResourceLoader DEFAULT_LOADER
Default ResourceLoader looking for resources in following order: 1. ClassPath 2. CurrentDir 3. Home

Method Detail

loadResource

InputStream loadResource(String resourceName)
                         throws ResourceNotFoundException
Method to load resource.

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


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