public class JarZipSchemeScanner extends java.lang.Object implements UriSchemeScanner
ScannerListener.| Constructor and Description |
|---|
JarZipSchemeScanner() |
| Modifier and Type | Method and Description |
|---|---|
protected Closing |
closing(java.lang.String jarUrlString)
Obtain a
Closing of the jar file. |
java.util.Set<java.lang.String> |
getSchemes()
Get the set of supported URI schemes.
|
void |
scan(java.net.URI u,
ScannerListener cfl)
Perform a scan and report resources to a scanning listener.
|
public java.util.Set<java.lang.String> getSchemes()
UriSchemeScannergetSchemes in interface UriSchemeScannerpublic void scan(java.net.URI u,
ScannerListener cfl)
UriSchemeScannerscan in interface UriSchemeScanneru - the URI to scan for resources.cfl - the scanning listener to report entries.protected Closing closing(java.lang.String jarUrlString) throws java.io.IOException
Closing 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.txtzip:http://www.example.com/fishfingers.zip!/example.txtOn 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.txtzip:d:/tempfishfingers.zip!/example.txt
This method will first attempt to create a Closing as follows:
new Closing(new URL(jarUrlString).openStream());if that fails with a
MalformedURLException then the method will
attempt to create a Closing instance as follows:
return new Closing(new FileInputStream(
UriComponent.decode(jarUrlString, UriComponent.Type.PATH)));
jarUrlString - the raw scheme specific part of a URI minus the jar
entryClosing.java.io.IOException - if there is an error opening the stream.Copyright © 2016 Oracle Corporation. All Rights Reserved.