final class JarZipSchemeResourceFinderFactory extends java.lang.Object implements UriSchemeResourceFinderFactory
ResourceProcessor
.Modifier and Type | Class and Description |
---|---|
private class |
JarZipSchemeResourceFinderFactory.JarZipSchemeScanner |
Modifier and Type | Field and Description |
---|---|
private static java.util.Set<java.lang.String> |
SCHEMES |
Constructor and Description |
---|
JarZipSchemeResourceFinderFactory()
Create new "jar", "zip" and "wsjar" scheme URI scanner factory.
|
Modifier and Type | Method and Description |
---|---|
JarZipSchemeResourceFinderFactory.JarZipSchemeScanner |
create(java.net.URI uri,
boolean recursive)
Create new
ResourceFinder for a given resource URI. |
private java.io.InputStream |
getInputStream(java.lang.String jarUrlString)
Obtain a
InputStream of the jar file. |
java.util.Set<java.lang.String> |
getSchemes()
Get the set of supported URI schemes.
|
JarZipSchemeResourceFinderFactory()
public java.util.Set<java.lang.String> getSchemes()
UriSchemeResourceFinderFactory
getSchemes
in interface UriSchemeResourceFinderFactory
public JarZipSchemeResourceFinderFactory.JarZipSchemeScanner create(java.net.URI uri, boolean recursive)
UriSchemeResourceFinderFactory
ResourceFinder
for a given resource URI.create
in interface UriSchemeResourceFinderFactory
uri
- resource URI.recursive
- defines whether a resource finder should recursively scan any recognized sub-resource
URIs (value of true
) or not (value of false
).private java.io.InputStream getInputStream(java.lang.String jarUrlString) throws java.io.IOException
InputStream
of the jar file.
For most platforms the format for the zip or jar follows the form of the
jar:file:///tmp/fishfingers.zip!/example.txt
zip:http://www.example.com/fishfingers.zip!/example.txt
On versions of the WebLogic application server a proprietary format is supported of the following form, which assumes a zip file located on the local file system:
zip:/tmp/fishfingers.zip!/example.txt
zip:d:/tempfishfingers.zip!/example.txt
InputStream
as follows:
new URL(jarUrlString).openStream();if that fails with a
MalformedURLException
then the method will
attempt to create a InputStream
instance as follows:
return new new FileInputStream( UriComponent.decode(jarUrlString, UriComponent.Type.PATH)));
jarUrlString
- the raw scheme specific part of a URI minus the jar
entryInputStream
.java.io.IOException
- if there is an error opening the stream.