public class DefaultWildcardStreamLocator extends Object implements WildcardStreamLocator, WildcardExpanderHandlerAware
WildcardStreamLocator.| Modifier and Type | Field and Description |
|---|---|
static String |
RECURSIVE_WILDCARD
Character to distinguish wildcard inside the uri.
|
| Constructor and Description |
|---|
DefaultWildcardStreamLocator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasWildcard(String uri) |
InputStream |
locateStream(String uri,
File folder)
Locates the stream based on the fileName containing the wildcard and the folder where to search.
|
void |
setWildcardExpanderHandler(Function<Collection<File>,Void> handler)
Sets the handler to be used by the implementing class.
|
public static final String RECURSIVE_WILDCARD
public boolean hasWildcard(String uri)
hasWildcard in interface WildcardStreamLocatoruri - to checkpublic InputStream locateStream(String uri, File folder) throws IOException
locateStream in interface WildcardStreamLocatoruri - the resource of the uri to locate. This uri should be exactly the same as defined in Resource.folder - parent from where the search of fileNameWithWildcard should start.InputStream to the resources collection matching the wildcard.IOException - if folder is invalid or when I/O error occurs while locating the stream.public void setWildcardExpanderHandler(Function<Collection<File>,Void> handler)
setWildcardExpanderHandler in interface WildcardExpanderHandlerAwarehandler - a Function which does the handler job.Copyright © 2008-2013. All Rights Reserved.