| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>ResourceFinder</title> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ResourceFinder"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../org/apache/ziplock/Join.NameCallback.html" title="interface in org.apache.ziplock"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../org/apache/ziplock/WebModule.html" title="class in org.apache.ziplock"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/apache/ziplock/ResourceFinder.html" target="_top">Frames</a></li> |
| <li><a href="ResourceFinder.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.ziplock</div> |
| <h2 title="Class ResourceFinder" class="title">Class ResourceFinder</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.ziplock.ResourceFinder</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">ResourceFinder</span> |
| extends java.lang.Object</pre> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#ResourceFinder-java.lang.String-">ResourceFinder</a></span>(java.lang.String path)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#ResourceFinder-java.lang.String-java.lang.ClassLoader-">ResourceFinder</a></span>(java.lang.String path, |
| java.lang.ClassLoader classLoader)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#ResourceFinder-java.lang.String-java.lang.ClassLoader-java.net.URL...-">ResourceFinder</a></span>(java.lang.String path, |
| java.lang.ClassLoader classLoader, |
| java.net.URL... urls)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#ResourceFinder-java.lang.String-java.net.URL...-">ResourceFinder</a></span>(java.lang.String path, |
| java.net.URL... urls)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#ResourceFinder-java.net.URL...-">ResourceFinder</a></span>(java.net.URL... urls)</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#decode-java.lang.String-">decode</a></span>(java.lang.String fileName)</code> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>java.net.URL</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#find-java.lang.String-">find</a></span>(java.lang.String uri)</code> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>java.util.List<java.net.URL></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findAll-java.lang.String-">findAll</a></span>(java.lang.String uri)</code> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>java.util.List<java.lang.Class<?>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findAllClasses-java.lang.String-">findAllClasses</a></span>(java.lang.String uri)</code> |
| <div class="block">Executes findAllStrings assuming the strings are |
| the names of a classes that should be loaded and returned.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><T> java.util.List<java.lang.Class<? extends T>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findAllImplementations-java.lang.Class-">findAllImplementations</a></span>(java.lang.Class<T> interfase)</code> |
| <div class="block">Assumes the class specified points to a file in the classpath that contains |
| the name of a class that implements or is a subclass of the specfied class.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>java.util.List<java.util.Properties></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findAllProperties-java.lang.String-">findAllProperties</a></span>(java.lang.String uri)</code> |
| <div class="block">Finds the corresponding resources and reads them in as a properties files |
| <p/> |
| Any URL that cannot be read in as a properties file will cause an exception to be thrown.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>java.util.List<java.lang.String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findAllStrings-java.lang.String-">findAllStrings</a></span>(java.lang.String uri)</code> |
| <div class="block">Reads the contents of the found URLs as a list of <code>String</code>'s and returns them.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>java.util.List<java.lang.Class<?>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findAvailableClasses-java.lang.String-">findAvailableClasses</a></span>(java.lang.String uri)</code> |
| <div class="block">Executes findAvailableStrings assuming the strings are |
| the names of a classes that should be loaded and returned.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><T> java.util.List<java.lang.Class<? extends T>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findAvailableImplementations-java.lang.Class-">findAvailableImplementations</a></span>(java.lang.Class<T> interfase)</code> |
| <div class="block">Assumes the class specified points to a file in the classpath that contains |
| the name of a class that implements or is a subclass of the specfied class.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>java.util.List<java.util.Properties></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findAvailableProperties-java.lang.String-">findAvailableProperties</a></span>(java.lang.String uri)</code> |
| <div class="block">Finds the corresponding resources and reads them in as a properties files |
| <p/> |
| Any URL that cannot be read in as a properties file will be added to the |
| 'resourcesNotLoaded' collection.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>java.util.List<java.lang.String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findAvailableStrings-java.lang.String-">findAvailableStrings</a></span>(java.lang.String uri)</code> |
| <div class="block">Reads the contents of the found URLs as a Strings and returns them.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>java.lang.Class<?></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findClass-java.lang.String-">findClass</a></span>(java.lang.String uri)</code> |
| <div class="block">Executes <a href="../../../org/apache/ziplock/ResourceFinder.html#findString-java.lang.String-"><code>findString(String)</code></a> assuming the contents URL found is the name of |
| a class that should be loaded and returned.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>java.lang.Class<?></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findImplementation-java.lang.Class-">findImplementation</a></span>(java.lang.Class<?> interfase)</code> |
| <div class="block">Assumes the class specified points to a file in the classpath that contains |
| the name of a class that implements or is a subclass of the specfied class.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>java.util.Properties</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findProperties-java.lang.String-">findProperties</a></span>(java.lang.String uri)</code> |
| <div class="block">Finds the corresponding resource and reads it in as a properties file |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/widget.properties |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| Properties widgetProps = finder.findProperties("widget.properties");</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#findString-java.lang.String-">findString</a></span>(java.lang.String uri)</code> |
| <div class="block">Reads the contents of the URL as a <code>String</code>'s and returns it.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>java.net.URL</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#getResource-java.lang.String-">getResource</a></span>(java.lang.String fullUri)</code> </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>java.util.Map<java.lang.String,java.net.URL></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#getResourcesMap-java.lang.String-">getResourcesMap</a></span>(java.lang.String uri)</code> </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>java.util.List<java.lang.String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#getResourcesNotLoaded--">getResourcesNotLoaded</a></span>()</code> |
| <div class="block">Returns a list of resources that could not be loaded in the last invoked findAvailable* or |
| mapAvailable* methods.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>java.util.Map<java.lang.String,java.lang.Class<?>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#mapAllClasses-java.lang.String-">mapAllClasses</a></span>(java.lang.String uri)</code> |
| <div class="block">Executes mapAllStrings assuming the value of each entry in the |
| map is the name of a class that should be loaded.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code><T> java.util.Map<java.lang.String,java.lang.Class<? extends T>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#mapAllImplementations-java.lang.Class-">mapAllImplementations</a></span>(java.lang.Class<T> interfase)</code> |
| <div class="block">Assumes the class specified points to a directory in the classpath that holds files |
| containing the name of a class that implements or is a subclass of the specfied class.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>java.util.Map<java.lang.String,java.util.Properties></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#mapAllProperties-java.lang.String-">mapAllProperties</a></span>(java.lang.String uri)</code> |
| <div class="block">Finds the corresponding resources and reads them in as a properties files |
| <p/> |
| Any URL that cannot be read in as a properties file will cause an exception to be thrown.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>java.util.Map<java.lang.String,java.lang.String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#mapAllStrings-java.lang.String-">mapAllStrings</a></span>(java.lang.String uri)</code> |
| <div class="block">Reads the contents of all non-directory URLs immediately under the specified |
| location and returns them in a map keyed by the file name.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>java.util.Map<java.lang.String,java.lang.Class<?>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#mapAvailableClasses-java.lang.String-">mapAvailableClasses</a></span>(java.lang.String uri)</code> |
| <div class="block">Executes mapAvailableStrings assuming the value of each entry in the |
| map is the name of a class that should be loaded.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code><T> java.util.Map<java.lang.String,java.lang.Class<? extends T>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#mapAvailableImplementations-java.lang.Class-">mapAvailableImplementations</a></span>(java.lang.Class<T> interfase)</code> |
| <div class="block">Assumes the class specified points to a directory in the classpath that holds files |
| containing the name of a class that implements or is a subclass of the specfied class.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>java.util.Map<java.lang.String,java.util.Properties></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#mapAvailableProperties-java.lang.String-">mapAvailableProperties</a></span>(java.lang.String uri)</code> |
| <div class="block">Finds the corresponding resources and reads them in as a properties files |
| <p/> |
| Any URL that cannot be read in as a properties file will be added to the |
| 'resourcesNotLoaded' collection.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>java.util.Map<java.lang.String,java.lang.String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ziplock/ResourceFinder.html#mapAvailableStrings-java.lang.String-">mapAvailableStrings</a></span>(java.lang.String uri)</code> |
| <div class="block">Reads the contents of all non-directory URLs immediately under the specified |
| location and returns them in a map keyed by the file name.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="ResourceFinder-java.net.URL...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ResourceFinder</h4> |
| <pre>public ResourceFinder(java.net.URL... urls)</pre> |
| </li> |
| </ul> |
| <a name="ResourceFinder-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ResourceFinder</h4> |
| <pre>public ResourceFinder(java.lang.String path)</pre> |
| </li> |
| </ul> |
| <a name="ResourceFinder-java.lang.String-java.net.URL...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ResourceFinder</h4> |
| <pre>public ResourceFinder(java.lang.String path, |
| java.net.URL... urls)</pre> |
| </li> |
| </ul> |
| <a name="ResourceFinder-java.lang.String-java.lang.ClassLoader-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ResourceFinder</h4> |
| <pre>public ResourceFinder(java.lang.String path, |
| java.lang.ClassLoader classLoader)</pre> |
| </li> |
| </ul> |
| <a name="ResourceFinder-java.lang.String-java.lang.ClassLoader-java.net.URL...-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ResourceFinder</h4> |
| <pre>public ResourceFinder(java.lang.String path, |
| java.lang.ClassLoader classLoader, |
| java.net.URL... urls)</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getResourcesNotLoaded--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResourcesNotLoaded</h4> |
| <pre>public java.util.List<java.lang.String> getResourcesNotLoaded()</pre> |
| <div class="block">Returns a list of resources that could not be loaded in the last invoked findAvailable* or |
| mapAvailable* methods. |
| <p/> |
| The list will only contain entries of resources that match the requirements |
| of the last invoked findAvailable* or mapAvailable* methods, but were unable to be |
| loaded and included in their results. |
| <p/> |
| The list returned is unmodifiable and the results of this method will change |
| after each invocation of a findAvailable* or mapAvailable* methods. |
| <p/> |
| This method is not thread safe.</div> |
| </li> |
| </ul> |
| <a name="find-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>find</h4> |
| <pre>public java.net.URL find(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findAll-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findAll</h4> |
| <pre>public java.util.List<java.net.URL> findAll(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findString-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findString</h4> |
| <pre>public java.lang.String findString(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Reads the contents of the URL as a <code>String</code>'s and returns it.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a stringified content of a resource</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if a resource pointed out by the uri param could not be find</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><code>ClassLoader.getResource(String)</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findAllStrings-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findAllStrings</h4> |
| <pre>public java.util.List<java.lang.String> findAllStrings(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Reads the contents of the found URLs as a list of <code>String</code>'s and returns them.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a list of the content of each resource URL found</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if any of the found URLs are unable to be read.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findAvailableStrings-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findAvailableStrings</h4> |
| <pre>public java.util.List<java.lang.String> findAvailableStrings(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Reads the contents of the found URLs as a Strings and returns them. |
| Individual URLs that cannot be read are skipped and added to the |
| list of 'resourcesNotLoaded'</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a list of the content of each resource URL found</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if classLoader.getResources throws an exception</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mapAllStrings-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapAllStrings</h4> |
| <pre>public java.util.Map<java.lang.String,java.lang.String> mapAllStrings(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Reads the contents of all non-directory URLs immediately under the specified |
| location and returns them in a map keyed by the file name. |
| <p/> |
| Any URLs that cannot be read will cause an exception to be thrown. |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/serializables/one |
| META-INF/serializables/two |
| META-INF/serializables/three |
| META-INF/serializables/four/foo.txt |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| Map map = finder.mapAvailableStrings("serializables"); |
| map.contains("one"); // true |
| map.contains("two"); // true |
| map.contains("three"); // true |
| map.contains("four"); // false</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a list of the content of each resource URL found</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if any of the urls cannot be read</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mapAvailableStrings-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapAvailableStrings</h4> |
| <pre>public java.util.Map<java.lang.String,java.lang.String> mapAvailableStrings(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Reads the contents of all non-directory URLs immediately under the specified |
| location and returns them in a map keyed by the file name. |
| <p/> |
| Individual URLs that cannot be read are skipped and added to the |
| list of 'resourcesNotLoaded' |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/serializables/one |
| META-INF/serializables/two # not readable |
| META-INF/serializables/three |
| META-INF/serializables/four/foo.txt |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| Map map = finder.mapAvailableStrings("serializables"); |
| map.contains("one"); // true |
| map.contains("two"); // false |
| map.contains("three"); // true |
| map.contains("four"); // false</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a list of the content of each resource URL found</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if classLoader.getResources throws an exception</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findClass-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findClass</h4> |
| <pre>public java.lang.Class<?> findClass(java.lang.String uri) |
| throws java.io.IOException, |
| java.lang.ClassNotFoundException</pre> |
| <div class="block">Executes <a href="../../../org/apache/ziplock/ResourceFinder.html#findString-java.lang.String-"><code>findString(String)</code></a> assuming the contents URL found is the name of |
| a class that should be loaded and returned.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| <dd><code>java.lang.ClassNotFoundException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findAllClasses-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findAllClasses</h4> |
| <pre>public java.util.List<java.lang.Class<?>> findAllClasses(java.lang.String uri) |
| throws java.io.IOException, |
| java.lang.ClassNotFoundException</pre> |
| <div class="block">Executes findAllStrings assuming the strings are |
| the names of a classes that should be loaded and returned. |
| <p/> |
| Any URL or class that cannot be loaded will cause an exception to be thrown.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| <dd><code>java.lang.ClassNotFoundException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findAvailableClasses-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findAvailableClasses</h4> |
| <pre>public java.util.List<java.lang.Class<?>> findAvailableClasses(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Executes findAvailableStrings assuming the strings are |
| the names of a classes that should be loaded and returned. |
| <p/> |
| Any class that cannot be loaded will be skipped and placed in the |
| 'resourcesNotLoaded' collection.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if classLoader.getResources throws an exception</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mapAllClasses-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapAllClasses</h4> |
| <pre>public java.util.Map<java.lang.String,java.lang.Class<?>> mapAllClasses(java.lang.String uri) |
| throws java.io.IOException, |
| java.lang.ClassNotFoundException</pre> |
| <div class="block">Executes mapAllStrings assuming the value of each entry in the |
| map is the name of a class that should be loaded. |
| <p/> |
| Any class that cannot be loaded will be cause an exception to be thrown. |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/xmlparsers/xerces |
| META-INF/xmlparsers/crimson |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| Map map = finder.mapAvailableStrings("xmlparsers"); |
| map.contains("xerces"); // true |
| map.contains("crimson"); // true |
| Class xercesClass = map.get("xerces"); |
| Class crimsonClass = map.get("crimson");</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| <dd><code>java.lang.ClassNotFoundException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mapAvailableClasses-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapAvailableClasses</h4> |
| <pre>public java.util.Map<java.lang.String,java.lang.Class<?>> mapAvailableClasses(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Executes mapAvailableStrings assuming the value of each entry in the |
| map is the name of a class that should be loaded. |
| <p/> |
| Any class that cannot be loaded will be skipped and placed in the |
| 'resourcesNotLoaded' collection. |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/xmlparsers/xerces |
| META-INF/xmlparsers/crimson |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| Map map = finder.mapAvailableStrings("xmlparsers"); |
| map.contains("xerces"); // true |
| map.contains("crimson"); // true |
| Class xercesClass = map.get("xerces"); |
| Class crimsonClass = map.get("crimson");</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if classLoader.getResources throws an exception</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findImplementation-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findImplementation</h4> |
| <pre>public java.lang.Class<?> findImplementation(java.lang.Class<?> interfase) |
| throws java.io.IOException, |
| java.lang.ClassNotFoundException</pre> |
| <div class="block">Assumes the class specified points to a file in the classpath that contains |
| the name of a class that implements or is a subclass of the specfied class. |
| <p/> |
| Any class that cannot be loaded will be cause an exception to be thrown. |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/java.io.InputStream # contains the classname org.acme.AcmeInputStream |
| META-INF/java.io.OutputStream |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| Class clazz = finder.findImplementation(java.io.InputStream.class); |
| clazz.getName(); // returns "org.acme.AcmeInputStream"</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>interfase</code> - a superclass or interface</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if the URL cannot be read</dd> |
| <dd><code>java.lang.ClassNotFoundException</code> - if the class found is not loadable</dd> |
| <dd><code>java.lang.ClassCastException</code> - if the class found is not assignable to the specified superclass or interface</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findAllImplementations-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findAllImplementations</h4> |
| <pre>public <T> java.util.List<java.lang.Class<? extends T>> findAllImplementations(java.lang.Class<T> interfase) |
| throws java.io.IOException, |
| java.lang.ClassNotFoundException</pre> |
| <div class="block">Assumes the class specified points to a file in the classpath that contains |
| the name of a class that implements or is a subclass of the specfied class. |
| <p/> |
| Any class that cannot be loaded or assigned to the specified interface will be cause |
| an exception to be thrown. |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/java.io.InputStream # contains the classname org.acme.AcmeInputStream |
| META-INF/java.io.InputStream # contains the classname org.widget.NeatoInputStream |
| META-INF/java.io.InputStream # contains the classname com.foo.BarInputStream |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| List classes = finder.findAllImplementations(java.io.InputStream.class); |
| classes.contains("org.acme.AcmeInputStream"); // true |
| classes.contains("org.widget.NeatoInputStream"); // true |
| classes.contains("com.foo.BarInputStream"); // true</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>interfase</code> - a superclass or interface</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if the URL cannot be read</dd> |
| <dd><code>java.lang.ClassNotFoundException</code> - if the class found is not loadable</dd> |
| <dd><code>java.lang.ClassCastException</code> - if the class found is not assignable to the specified superclass or interface</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findAvailableImplementations-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findAvailableImplementations</h4> |
| <pre>public <T> java.util.List<java.lang.Class<? extends T>> findAvailableImplementations(java.lang.Class<T> interfase) |
| throws java.io.IOException</pre> |
| <div class="block">Assumes the class specified points to a file in the classpath that contains |
| the name of a class that implements or is a subclass of the specfied class. |
| <p/> |
| Any class that cannot be loaded or are not assignable to the specified class will be |
| skipped and placed in the 'resourcesNotLoaded' collection. |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/java.io.InputStream # contains the classname org.acme.AcmeInputStream |
| META-INF/java.io.InputStream # contains the classname org.widget.NeatoInputStream |
| META-INF/java.io.InputStream # contains the classname com.foo.BarInputStream |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| List classes = finder.findAllImplementations(java.io.InputStream.class); |
| classes.contains("org.acme.AcmeInputStream"); // true |
| classes.contains("org.widget.NeatoInputStream"); // true |
| classes.contains("com.foo.BarInputStream"); // true</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>interfase</code> - a superclass or interface</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if classLoader.getResources throws an exception</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mapAllImplementations-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapAllImplementations</h4> |
| <pre>public <T> java.util.Map<java.lang.String,java.lang.Class<? extends T>> mapAllImplementations(java.lang.Class<T> interfase) |
| throws java.io.IOException, |
| java.lang.ClassNotFoundException</pre> |
| <div class="block">Assumes the class specified points to a directory in the classpath that holds files |
| containing the name of a class that implements or is a subclass of the specfied class. |
| <p/> |
| Any class that cannot be loaded or assigned to the specified interface will be cause |
| an exception to be thrown. |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/java.net.URLStreamHandler/jar |
| META-INF/java.net.URLStreamHandler/file |
| META-INF/java.net.URLStreamHandler/http |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| Map map = finder.mapAllImplementations(java.net.URLStreamHandler.class); |
| Class jarUrlHandler = map.get("jar"); |
| Class fileUrlHandler = map.get("file"); |
| Class httpUrlHandler = map.get("http");</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>interfase</code> - a superclass or interface</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if the URL cannot be read</dd> |
| <dd><code>java.lang.ClassNotFoundException</code> - if the class found is not loadable</dd> |
| <dd><code>java.lang.ClassCastException</code> - if the class found is not assignable to the specified superclass or interface</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mapAvailableImplementations-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapAvailableImplementations</h4> |
| <pre>public <T> java.util.Map<java.lang.String,java.lang.Class<? extends T>> mapAvailableImplementations(java.lang.Class<T> interfase) |
| throws java.io.IOException</pre> |
| <div class="block">Assumes the class specified points to a directory in the classpath that holds files |
| containing the name of a class that implements or is a subclass of the specfied class. |
| <p/> |
| Any class that cannot be loaded or are not assignable to the specified class will be |
| skipped and placed in the 'resourcesNotLoaded' collection. |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/java.net.URLStreamHandler/jar |
| META-INF/java.net.URLStreamHandler/file |
| META-INF/java.net.URLStreamHandler/http |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| Map map = finder.mapAllImplementations(java.net.URLStreamHandler.class); |
| Class jarUrlHandler = map.get("jar"); |
| Class fileUrlHandler = map.get("file"); |
| Class httpUrlHandler = map.get("http");</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>interfase</code> - a superclass or interface</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if classLoader.getResources throws an exception</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findProperties-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findProperties</h4> |
| <pre>public java.util.Properties findProperties(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Finds the corresponding resource and reads it in as a properties file |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/widget.properties |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| Properties widgetProps = finder.findProperties("widget.properties");</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if the URL cannot be read or is not in properties file format</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findAllProperties-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findAllProperties</h4> |
| <pre>public java.util.List<java.util.Properties> findAllProperties(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Finds the corresponding resources and reads them in as a properties files |
| <p/> |
| Any URL that cannot be read in as a properties file will cause an exception to be thrown. |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/app.properties |
| META-INF/app.properties |
| META-INF/app.properties |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| List<Properties> appProps = finder.findAllProperties("app.properties");</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if the URL cannot be read or is not in properties file format</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findAvailableProperties-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findAvailableProperties</h4> |
| <pre>public java.util.List<java.util.Properties> findAvailableProperties(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Finds the corresponding resources and reads them in as a properties files |
| <p/> |
| Any URL that cannot be read in as a properties file will be added to the |
| 'resourcesNotLoaded' collection. |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/app.properties |
| META-INF/app.properties |
| META-INF/app.properties |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| List<Properties> appProps = finder.findAvailableProperties("app.properties");</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if classLoader.getResources throws an exception</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mapAllProperties-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapAllProperties</h4> |
| <pre>public java.util.Map<java.lang.String,java.util.Properties> mapAllProperties(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Finds the corresponding resources and reads them in as a properties files |
| <p/> |
| Any URL that cannot be read in as a properties file will cause an exception to be thrown. |
| <p/> |
| Example classpath: |
| <p/> |
| - META-INF/jdbcDrivers/oracle.properties |
| - META-INF/jdbcDrivers/mysql.props |
| - META-INF/jdbcDrivers/derby |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| List<Properties> driversList = finder.findAvailableProperties("jdbcDrivers"); |
| Properties oracleProps = driversList.get("oracle.properties"); |
| Properties mysqlProps = driversList.get("mysql.props"); |
| Properties derbyProps = driversList.get("derby");</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if the URL cannot be read or is not in properties file format</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="mapAvailableProperties-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>mapAvailableProperties</h4> |
| <pre>public java.util.Map<java.lang.String,java.util.Properties> mapAvailableProperties(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <div class="block">Finds the corresponding resources and reads them in as a properties files |
| <p/> |
| Any URL that cannot be read in as a properties file will be added to the |
| 'resourcesNotLoaded' collection. |
| <p/> |
| Example classpath: |
| <p/> |
| META-INF/jdbcDrivers/oracle.properties |
| META-INF/jdbcDrivers/mysql.props |
| META-INF/jdbcDrivers/derby |
| <p/> |
| ResourceFinder finder = new ResourceFinder("META-INF/"); |
| List<Properties> driversList = finder.findAvailableProperties("jdbcDrivers"); |
| Properties oracleProps = driversList.get("oracle.properties"); |
| Properties mysqlProps = driversList.get("mysql.props"); |
| Properties derbyProps = driversList.get("derby");</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if classLoader.getResources throws an exception</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getResourcesMap-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResourcesMap</h4> |
| <pre>public java.util.Map<java.lang.String,java.net.URL> getResourcesMap(java.lang.String uri) |
| throws java.io.IOException</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getResource-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResource</h4> |
| <pre>public java.net.URL getResource(java.lang.String fullUri)</pre> |
| </li> |
| </ul> |
| <a name="decode-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>decode</h4> |
| <pre>public static java.lang.String decode(java.lang.String fileName)</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../org/apache/ziplock/Join.NameCallback.html" title="interface in org.apache.ziplock"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../org/apache/ziplock/WebModule.html" title="class in org.apache.ziplock"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/apache/ziplock/ResourceFinder.html" target="_top">Frames</a></li> |
| <li><a href="ResourceFinder.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |