public class JarWildcardStreamLocator extends DefaultWildcardStreamLocator
The locateStream(String, File) overrides the default strategy defined in
DefaultWildcardStreamLocator and it tries to open the provided file as a JAR. If that's successfully opened
all entries inside this container will be verified against the wildcard pattern. If the JAR-lookup strategy fails,
default strategy is invoked.
For the moment this WildcardStreamLocator only supports a single wildcard.
RECURSIVE_WILDCARD| Constructor and Description |
|---|
JarWildcardStreamLocator() |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
locateStream(String uri,
File folder)
Finds the specified URI pattern inside a JAR file.
|
hasWildcard, setWildcardExpanderHandler, stripQueryPathpublic InputStream locateStream(String uri, File folder) throws IOException
locateStream in interface WildcardStreamLocatorlocateStream in class DefaultWildcardStreamLocatoruri - 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.Copyright © 2008-2014. All Rights Reserved.