| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_92) on Thu Jun 07 14:26:26 EDT 2018 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Resource (Jetty :: Project 9.3.24.v20180605 API)</title> |
| <meta name="date" content="2018-06-07"> |
| <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="Resource (Jetty :: Project 9.3.24.v20180605 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":10,"i3":6,"i4":42,"i5":6,"i6":10,"i7":10,"i8":10,"i9":10,"i10":9,"i11":6,"i12":6,"i13":10,"i14":6,"i15":6,"i16":10,"i17":10,"i18":38,"i19":10,"i20":10,"i21":10,"i22":6,"i23":9,"i24":6,"i25":6,"i26":6,"i27":6,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":42,"i37":6,"i38":10,"i39":9,"i40":9,"i41":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated 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="class-use/Resource.html">Use</a></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/eclipse/jetty/util/resource/PathResource.html" title="class in org.eclipse.jetty.util.resource"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/eclipse/jetty/util/resource/ResourceCollection.html" title="class in org.eclipse.jetty.util.resource"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/eclipse/jetty/util/resource/Resource.html" target="_top">Frames</a></li> |
| <li><a href="Resource.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><a href="#field.summary">Field</a> | </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><a href="#field.detail">Field</a> | </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.eclipse.jetty.util.resource</div> |
| <h2 title="Class Resource" class="title">Class Resource</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.eclipse.jetty.util.resource.Resource</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd>java.io.Closeable, java.lang.AutoCloseable, <a href="../../../../../org/eclipse/jetty/util/resource/ResourceFactory.html" title="interface in org.eclipse.jetty.util.resource">ResourceFactory</a></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><a href="../../../../../org/eclipse/jetty/util/resource/EmptyResource.html" title="class in org.eclipse.jetty.util.resource">EmptyResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html" title="class in org.eclipse.jetty.util.resource">FileResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/PathResource.html" title="class in org.eclipse.jetty.util.resource">PathResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/ResourceCollection.html" title="class in org.eclipse.jetty.util.resource">ResourceCollection</a>, <a href="../../../../../org/eclipse/jetty/util/resource/URLResource.html" title="class in org.eclipse.jetty.util.resource">URLResource</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public abstract class <span class="typeNameLabel">Resource</span> |
| extends java.lang.Object |
| implements <a href="../../../../../org/eclipse/jetty/util/resource/ResourceFactory.html" title="interface in org.eclipse.jetty.util.resource">ResourceFactory</a>, java.io.Closeable</pre> |
| <div class="block">Abstract resource class. |
| <p> |
| This class provides a resource abstraction, where a resource may be |
| a file, a URL or an entry in a jar file. |
| </p></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#Z:Z__defaultUseCaches">__defaultUseCaches</a></span></code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== 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/eclipse/jetty/util/resource/Resource.html#Resource--">Resource</a></span>()</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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated 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>abstract <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#addPath-java.lang.String-">addPath</a></span>(java.lang.String path)</code> |
| <div class="block">Returns the resource contained inside the current resource with the |
| given name.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>abstract void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#close--">close</a></span>()</code> |
| <div class="block">Release any temporary resources held by the resource.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#copyTo-java.io.File-">copyTo</a></span>(java.io.File destination)</code> |
| <div class="block">Copy the Resource to the new destination file.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#delete--">delete</a></span>()</code> |
| <div class="block">Deletes the given resource</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#encode-java.lang.String-">encode</a></span>(java.lang.String uri)</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">use <a href="../../../../../org/eclipse/jetty/util/URIUtil.html" title="class in org.eclipse.jetty.util"><code>URIUtil</code></a> or <a href="../../../../../org/eclipse/jetty/util/UrlEncoded.html" title="class in org.eclipse.jetty.util"><code>UrlEncoded</code></a> instead</span></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#exists--">exists</a></span>()</code> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#finalize--">finalize</a></span>()</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>java.net.URI</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getAlias--">getAlias</a></span>()</code> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>java.util.Collection<<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getAllResources--">getAllResources</a></span>()</code> </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>java.lang.Object</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getAssociate--">getAssociate</a></span>()</code> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getDefaultUseCaches--">getDefaultUseCaches</a></span>()</code> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>abstract java.io.File</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getFile--">getFile</a></span>()</code> |
| <div class="block">File representing the given resource.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>abstract java.io.InputStream</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getInputStream--">getInputStream</a></span>()</code> |
| <div class="block">Input stream to the resource</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getListHTML-java.lang.String-boolean-">getListHTML</a></span>(java.lang.String base, |
| boolean parent)</code> |
| <div class="block">Get the resource list as a HTML directory listing.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>abstract java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getName--">getName</a></span>()</code> |
| <div class="block">The name of the resource.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>abstract java.nio.channels.ReadableByteChannel</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getReadableByteChannel--">getReadableByteChannel</a></span>()</code> |
| <div class="block">Readable ByteChannel for the resource.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getResource-java.lang.String-">getResource</a></span>(java.lang.String path)</code> |
| <div class="block">Get a resource from within this resource.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>java.net.URI</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getURI--">getURI</a></span>()</code> |
| <div class="block">URI representing the resource.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>abstract java.net.URL</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getURL--">getURL</a></span>()</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">use {<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getURI--"><code>getURI()</code></a>.toURL() instead.</span></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getWeakETag--">getWeakETag</a></span>()</code> |
| <div class="block">Generate a weak ETag reference for this Resource.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getWeakETag-java.lang.String-">getWeakETag</a></span>(java.lang.String suffix)</code> </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#isAlias--">isAlias</a></span>()</code> </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#isContainedIn-org.eclipse.jetty.util.resource.Resource-">isContainedIn</a></span>(<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> r)</code> </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#isContainedIn-org.eclipse.jetty.util.resource.Resource-org.eclipse.jetty.util.resource.Resource-">isContainedIn</a></span>(<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> r, |
| <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> containingResource)</code> </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#isDirectory--">isDirectory</a></span>()</code> </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>abstract long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#lastModified--">lastModified</a></span>()</code> |
| <div class="block">Time resource was last modified.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code>abstract long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#length--">length</a></span>()</code> |
| <div class="block">Length of the resource.</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code>abstract java.lang.String[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#list--">list</a></span>()</code> |
| <div class="block">list of resource names contained in the given resource.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newClassPathResource-java.lang.String-">newClassPathResource</a></span>(java.lang.String resource)</code> |
| <div class="block">Find a classpath resource.</div> |
| </td> |
| </tr> |
| <tr id="i29" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newClassPathResource-java.lang.String-boolean-boolean-">newClassPathResource</a></span>(java.lang.String name, |
| boolean useCaches, |
| boolean checkParents)</code> |
| <div class="block">Find a classpath resource.</div> |
| </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newResource-java.io.File-">newResource</a></span>(java.io.File file)</code> </td> |
| </tr> |
| <tr id="i31" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newResource-java.lang.String-">newResource</a></span>(java.lang.String resource)</code> |
| <div class="block">Construct a resource from a string.</div> |
| </td> |
| </tr> |
| <tr id="i32" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newResource-java.lang.String-boolean-">newResource</a></span>(java.lang.String resource, |
| boolean useCaches)</code> |
| <div class="block">Construct a resource from a string.</div> |
| </td> |
| </tr> |
| <tr id="i33" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newResource-java.net.URI-">newResource</a></span>(java.net.URI uri)</code> |
| <div class="block">Construct a resource from a uri.</div> |
| </td> |
| </tr> |
| <tr id="i34" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newResource-java.net.URL-">newResource</a></span>(java.net.URL url)</code> |
| <div class="block">Construct a resource from a url.</div> |
| </td> |
| </tr> |
| <tr id="i35" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newSystemResource-java.lang.String-">newSystemResource</a></span>(java.lang.String resource)</code> |
| <div class="block">Construct a system resource from a string.</div> |
| </td> |
| </tr> |
| <tr id="i36" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#release--">release</a></span>()</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">use <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#close--"><code>close()</code></a></span></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i37" class="rowColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#renameTo-org.eclipse.jetty.util.resource.Resource-">renameTo</a></span>(<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> dest)</code> |
| <div class="block">Rename the given resource</div> |
| </td> |
| </tr> |
| <tr id="i38" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#setAssociate-java.lang.Object-">setAssociate</a></span>(java.lang.Object o)</code> </td> |
| </tr> |
| <tr id="i39" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#setDefaultUseCaches-boolean-">setDefaultUseCaches</a></span>(boolean useCaches)</code> |
| <div class="block">Change the default setting for url connection caches.</div> |
| </td> |
| </tr> |
| <tr id="i40" class="altColor"> |
| <td class="colFirst"><code>static java.net.URL</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#toURL-java.io.File-">toURL</a></span>(java.io.File file)</code> |
| <div class="block">Generate a properly encoded URL from a <code>File</code> instance.</div> |
| </td> |
| </tr> |
| <tr id="i41" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#writeTo-java.io.OutputStream-long-long-">writeTo</a></span>(java.io.OutputStream out, |
| long start, |
| long count)</code> </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, 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"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="Z:Z__defaultUseCaches"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>__defaultUseCaches</h4> |
| <pre>public static boolean __defaultUseCaches</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="Resource--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Resource</h4> |
| <pre>public Resource()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setDefaultUseCaches-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDefaultUseCaches</h4> |
| <pre>public static void setDefaultUseCaches(boolean useCaches)</pre> |
| <div class="block">Change the default setting for url connection caches. |
| Subsequent URLConnections will use this default.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>useCaches</code> - true to enable URL connection caches, false otherwise.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getDefaultUseCaches--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDefaultUseCaches</h4> |
| <pre>public static boolean getDefaultUseCaches()</pre> |
| </li> |
| </ul> |
| <a name="newResource-java.net.URI-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newResource</h4> |
| <pre>public static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> newResource(java.net.URI uri) |
| throws java.net.MalformedURLException</pre> |
| <div class="block">Construct a resource from a uri.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - A URI.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A Resource object.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.net.MalformedURLException</code> - Problem accessing URI</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newResource-java.net.URL-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newResource</h4> |
| <pre>public static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> newResource(java.net.URL url)</pre> |
| <div class="block">Construct a resource from a url.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>url</code> - A URL.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A Resource object.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newResource-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newResource</h4> |
| <pre>public static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> newResource(java.lang.String resource) |
| throws java.net.MalformedURLException</pre> |
| <div class="block">Construct a resource from a string.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>resource</code> - A URL or filename.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A Resource object.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.net.MalformedURLException</code> - Problem accessing URI</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newResource-java.lang.String-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newResource</h4> |
| <pre>public static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> newResource(java.lang.String resource, |
| boolean useCaches) |
| throws java.net.MalformedURLException</pre> |
| <div class="block">Construct a resource from a string.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>resource</code> - A URL or filename.</dd> |
| <dd><code>useCaches</code> - controls URLConnection caching</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A Resource object.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.net.MalformedURLException</code> - Problem accessing URI</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newResource-java.io.File-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newResource</h4> |
| <pre>public static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> newResource(java.io.File file)</pre> |
| </li> |
| </ul> |
| <a name="newSystemResource-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newSystemResource</h4> |
| <pre>public static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> newSystemResource(java.lang.String resource) |
| throws java.io.IOException</pre> |
| <div class="block">Construct a system resource from a string. |
| The resource is tried as classloader resource before being |
| treated as a normal resource.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>resource</code> - Resource as string representation</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The new Resource</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - Problem accessing resource.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newClassPathResource-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newClassPathResource</h4> |
| <pre>public static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> newClassPathResource(java.lang.String resource)</pre> |
| <div class="block">Find a classpath resource.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>resource</code> - the relative name of the resource</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Resource or null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newClassPathResource-java.lang.String-boolean-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newClassPathResource</h4> |
| <pre>public static <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> newClassPathResource(java.lang.String name, |
| boolean useCaches, |
| boolean checkParents)</pre> |
| <div class="block">Find a classpath resource. |
| The <code>Class.getResource(String)</code> method is used to lookup the resource. If it is not |
| found, then the <a href="../../../../../org/eclipse/jetty/util/Loader.html#getResource-java.lang.Class-java.lang.String-"><code>Loader.getResource(Class, String)</code></a> method is used. |
| If it is still not found, then <code>ClassLoader.getSystemResource(String)</code> is used. |
| Unlike <code>ClassLoader.getSystemResource(String)</code> this method does not check for normal resources.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The relative name of the resource</dd> |
| <dd><code>useCaches</code> - True if URL caches are to be used.</dd> |
| <dd><code>checkParents</code> - True if forced searching of parent Classloaders is performed to work around |
| loaders with inverted priorities</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Resource or null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isContainedIn-org.eclipse.jetty.util.resource.Resource-org.eclipse.jetty.util.resource.Resource-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isContainedIn</h4> |
| <pre>public static boolean isContainedIn(<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> r, |
| <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> containingResource) |
| throws java.net.MalformedURLException</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.net.MalformedURLException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="finalize--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>finalize</h4> |
| <pre>protected void finalize()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code>finalize</code> in class <code>java.lang.Object</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isContainedIn-org.eclipse.jetty.util.resource.Resource-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isContainedIn</h4> |
| <pre>public abstract boolean isContainedIn(<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> r) |
| throws java.net.MalformedURLException</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.net.MalformedURLException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="release--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>release</h4> |
| <pre>public final void release()</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">use <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#close--"><code>close()</code></a></span></div> |
| <div class="block">Release any temporary resources held by the resource.</div> |
| </li> |
| </ul> |
| <a name="close--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre>public abstract void close()</pre> |
| <div class="block">Release any temporary resources held by the resource.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>close</code> in interface <code>java.io.Closeable</code></dd> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>close</code> in interface <code>java.lang.AutoCloseable</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="exists--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>exists</h4> |
| <pre>public abstract boolean exists()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the represented resource exists.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isDirectory--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isDirectory</h4> |
| <pre>public abstract boolean isDirectory()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the represented resource is a container/directory. |
| if the resource is not a file, resources ending with "/" are |
| considered directories.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="lastModified--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lastModified</h4> |
| <pre>public abstract long lastModified()</pre> |
| <div class="block">Time resource was last modified.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the last modified time as milliseconds since unix epoch</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="length--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>length</h4> |
| <pre>public abstract long length()</pre> |
| <div class="block">Length of the resource.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the length of the resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getURL--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getURL</h4> |
| <pre>@Deprecated |
| public abstract java.net.URL getURL()</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">use {<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getURI--"><code>getURI()</code></a>.toURL() instead.</span></div> |
| <div class="block">URL representing the resource.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an URL representing the given resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getURI--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getURI</h4> |
| <pre>public java.net.URI getURI()</pre> |
| <div class="block">URI representing the resource.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an URI representing the given resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getFile--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFile</h4> |
| <pre>public abstract java.io.File getFile() |
| throws java.io.IOException</pre> |
| <div class="block">File representing the given resource.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an File representing the given resource or NULL if this |
| is not possible.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if unable to get the resource due to permissions</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getName</h4> |
| <pre>public abstract java.lang.String getName()</pre> |
| <div class="block">The name of the resource.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the name of the resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getInputStream--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInputStream</h4> |
| <pre>public abstract java.io.InputStream getInputStream() |
| throws java.io.IOException</pre> |
| <div class="block">Input stream to the resource</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an input stream to the resource</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if unable to open the input stream</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getReadableByteChannel--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getReadableByteChannel</h4> |
| <pre>public abstract java.nio.channels.ReadableByteChannel getReadableByteChannel() |
| throws java.io.IOException</pre> |
| <div class="block">Readable ByteChannel for the resource.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an readable bytechannel to the resource or null if one is not available.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if unable to open the readable bytechannel for the resource.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="delete--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>delete</h4> |
| <pre>public abstract boolean delete() |
| throws java.lang.SecurityException</pre> |
| <div class="block">Deletes the given resource</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if resource was found and successfully deleted, false if resource didn't exist or was unable to |
| be deleted.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.SecurityException</code> - if unable to delete due to permissions</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="renameTo-org.eclipse.jetty.util.resource.Resource-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>renameTo</h4> |
| <pre>public abstract boolean renameTo(<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> dest) |
| throws java.lang.SecurityException</pre> |
| <div class="block">Rename the given resource</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dest</code> - the destination name for the resource</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the resource was renamed, false if the resource didn't exist or was unable to be renamed.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.SecurityException</code> - if unable to rename due to permissions</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="list--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>list</h4> |
| <pre>public abstract java.lang.String[] list()</pre> |
| <div class="block">list of resource names contained in the given resource.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a list of resource names contained in the given resource. |
| Note: The resource names are not URL encoded.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addPath-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addPath</h4> |
| <pre>public abstract <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> addPath(java.lang.String path) |
| throws java.io.IOException, |
| java.net.MalformedURLException</pre> |
| <div class="block">Returns the resource contained inside the current resource with the |
| given name.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>path</code> - The path segment to add, which is not encoded</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the Resource for the resolved path within this Resource.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if unable to resolve the path</dd> |
| <dd><code>java.net.MalformedURLException</code> - if the resolution of the path fails because the input path parameter is malformed.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getResource-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResource</h4> |
| <pre>public <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a> getResource(java.lang.String path)</pre> |
| <div class="block">Get a resource from within this resource. |
| <p> |
| This method is essentially an alias for <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#addPath-java.lang.String-"><code>addPath(String)</code></a>, but without checked exceptions. |
| This method satisfied the <a href="../../../../../org/eclipse/jetty/util/resource/ResourceFactory.html" title="interface in org.eclipse.jetty.util.resource"><code>ResourceFactory</code></a> interface.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/eclipse/jetty/util/resource/ResourceFactory.html#getResource-java.lang.String-">getResource</a></code> in interface <code><a href="../../../../../org/eclipse/jetty/util/resource/ResourceFactory.html" title="interface in org.eclipse.jetty.util.resource">ResourceFactory</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>path</code> - The path to the resource</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The resource or null</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/eclipse/jetty/util/resource/ResourceFactory.html#getResource-java.lang.String-"><code>ResourceFactory.getResource(java.lang.String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="encode-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>encode</h4> |
| <pre>@Deprecated |
| public java.lang.String encode(java.lang.String uri)</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">use <a href="../../../../../org/eclipse/jetty/util/URIUtil.html" title="class in org.eclipse.jetty.util"><code>URIUtil</code></a> or <a href="../../../../../org/eclipse/jetty/util/UrlEncoded.html" title="class in org.eclipse.jetty.util"><code>UrlEncoded</code></a> instead</span></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - the uri to encode</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>null (this is deprecated)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAssociate--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAssociate</h4> |
| <pre>public java.lang.Object getAssociate()</pre> |
| </li> |
| </ul> |
| <a name="setAssociate-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAssociate</h4> |
| <pre>public void setAssociate(java.lang.Object o)</pre> |
| </li> |
| </ul> |
| <a name="isAlias--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isAlias</h4> |
| <pre>public boolean isAlias()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this Resource is an alias to another real Resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAlias--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAlias</h4> |
| <pre>public java.net.URI getAlias()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The canonical Alias of this resource or null if none.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getListHTML-java.lang.String-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getListHTML</h4> |
| <pre>public java.lang.String getListHTML(java.lang.String base, |
| boolean parent) |
| throws java.io.IOException</pre> |
| <div class="block">Get the resource list as a HTML directory listing.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>base</code> - The base URL</dd> |
| <dd><code>parent</code> - True if the parent directory should be included</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>String of HTML</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if unable to get the list of resources as HTML</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writeTo-java.io.OutputStream-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeTo</h4> |
| <pre>public void writeTo(java.io.OutputStream out, |
| long start, |
| long count) |
| throws java.io.IOException</pre> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - the output stream to write to</dd> |
| <dd><code>start</code> - First byte to write</dd> |
| <dd><code>count</code> - Bytes to write or -1 for all of them.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if unable to copy the Resource to the output</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyTo-java.io.File-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyTo</h4> |
| <pre>public void copyTo(java.io.File destination) |
| throws java.io.IOException</pre> |
| <div class="block">Copy the Resource to the new destination file. |
| <p> |
| Will not replace existing destination file.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>destination</code> - the destination file to create</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if unable to copy the resource</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getWeakETag--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWeakETag</h4> |
| <pre>public java.lang.String getWeakETag()</pre> |
| <div class="block">Generate a weak ETag reference for this Resource.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the weak ETag reference for this resource.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getWeakETag-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getWeakETag</h4> |
| <pre>public java.lang.String getWeakETag(java.lang.String suffix)</pre> |
| </li> |
| </ul> |
| <a name="getAllResources--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAllResources</h4> |
| <pre>public java.util.Collection<<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a>> getAllResources()</pre> |
| </li> |
| </ul> |
| <a name="toURL-java.io.File-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toURL</h4> |
| <pre>public static java.net.URL toURL(java.io.File file) |
| throws java.net.MalformedURLException</pre> |
| <div class="block">Generate a properly encoded URL from a <code>File</code> instance.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>file</code> - Target file.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>URL of the target file.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.net.MalformedURLException</code> - if unable to convert File to URL</dd> |
| </dl> |
| </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="class-use/Resource.html">Use</a></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/eclipse/jetty/util/resource/PathResource.html" title="class in org.eclipse.jetty.util.resource"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/eclipse/jetty/util/resource/ResourceCollection.html" title="class in org.eclipse.jetty.util.resource"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/eclipse/jetty/util/resource/Resource.html" target="_top">Frames</a></li> |
| <li><a href="Resource.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><a href="#field.summary">Field</a> | </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><a href="#field.detail">Field</a> | </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 ======= --> |
| <p class="legalCopy"><small>Copyright © 1995–2018 <a href="http://webtide.com">Webtide</a>. All rights reserved.</small></p> |
| </body> |
| </html> |