|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jersey.core.spi.scanning.uri.JarZipSchemeScanner
public class JarZipSchemeScanner
A "jar" and "zip" scheme URI scanner that recursively jar files.
Jar entries are reported to a ScannerListener.
| Constructor Summary | |
|---|---|
JarZipSchemeScanner()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JarZipSchemeScanner()
| Method Detail |
|---|
public java.util.Set<java.lang.String> getSchemes()
UriSchemeScanner
getSchemes in interface UriSchemeScanner
public void scan(java.net.URI u,
ScannerListener cfl)
UriSchemeScanner
scan 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
entry
Closing.
java.io.IOException - if there is an error opening the stream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||