blob: 6f63376aa1f4be818b553489bfe71022014efde8 [file] [log] [blame]
<!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 (version 1.7.0_80) on Wed Jun 07 15:10:49 EDT 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FileResource (Jetty :: Project 9.2.22.v20170606 API)</title>
<meta name="date" content="2017-06-07">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="FileResource (Jetty :: Project 9.2.22.v20170606 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/FileResource.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 class="aboutLanguage"><em><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1149868-7']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/eclipse/jetty/util/resource/EmptyResource.html" title="class in org.eclipse.jetty.util.resource"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/eclipse/jetty/util/resource/JarResource.html" title="class in org.eclipse.jetty.util.resource"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/jetty/util/resource/FileResource.html" target="_top">Frames</a></li>
<li><a href="FileResource.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields_inherited_from_class_org.eclipse.jetty.util.resource.Resource">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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 FileResource" class="title">Class FileResource</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">org.eclipse.jetty.util.resource.Resource</a></li>
<li>
<ul class="inheritance">
<li>org.eclipse.jetty.util.resource.FileResource</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a>, <a href="../../../../../org/eclipse/jetty/util/resource/ResourceFactory.html" title="interface in org.eclipse.jetty.util.resource">ResourceFactory</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">FileResource</span>
extends <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></pre>
<div class="block">File Resource.
Handle resources of implied or explicit file type.
This class can check for aliasing in the filesystem (eg case
insensitivity). By default this is turned on, or it can be controlled
by calling the static method @see FileResource#setCheckAliases(boolean)</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>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_org.eclipse.jetty.util.resource.Resource">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.eclipse.jetty.util.resource.<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></h3>
<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#__defaultUseCaches">__defaultUseCaches</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#FileResource(java.net.URI)">FileResource</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#FileResource(java.net.URL)">FileResource</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr 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><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#addPath(java.lang.String)">addPath</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path)</code>
<div class="block">Returns the resource contained inside the current resource with the
given name.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#close()">close</a></strong>()</code>
<div class="block">Release any temporary resources held by the resource.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#copyTo(java.io.File)">copyTo</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destination)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#delete()">delete</a></strong>()</code>
<div class="block">Deletes the given resource</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#equals(java.lang.Object)">equals</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;o)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#exists()">exists</a></strong>()</code>
<div class="block">Returns true if the resource exists.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#getAlias()">getAlias</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#getFile()">getFile</a></strong>()</code>
<div class="block">Returns an File representing the given resource or NULL if this
is not possible.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#getInputStream()">getInputStream</a></strong>()</code>
<div class="block">Returns an input stream to the resource</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#getName()">getName</a></strong>()</code>
<div class="block">Returns the name of the resource</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#getReadableByteChannel()">getReadableByteChannel</a></strong>()</code>
<div class="block">Returns an readable bytechannel to the resource or null if one is not available.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#getURI()">getURI</a></strong>()</code>
<div class="block">Returns an URI representing the given resource</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#getURL()">getURL</a></strong>()</code>
<div class="block">Returns an URL representing the given resource</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#hashCode()">hashCode</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#isContainedIn(org.eclipse.jetty.util.resource.Resource)">isContainedIn</a></strong>(<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a>&nbsp;r)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#isDirectory()">isDirectory</a></strong>()</code>
<div class="block">Returns true if the resource is a container/directory.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#lastModified()">lastModified</a></strong>()</code>
<div class="block">Returns the last modified time</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#length()">length</a></strong>()</code>
<div class="block">Return the length of the resource</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#list()">list</a></strong>()</code>
<div class="block">Returns a list of resources contained in the given resource</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#renameTo(org.eclipse.jetty.util.resource.Resource)">renameTo</a></strong>(<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a>&nbsp;dest)</code>
<div class="block">Rename the given resource</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html#toString()">toString</a></strong>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.eclipse.jetty.util.resource.Resource">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.eclipse.jetty.util.resource.<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></h3>
<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#encode(java.lang.String)">encode</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#finalize()">finalize</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getAllResources()">getAllResources</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getAssociate()">getAssociate</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getDefaultUseCaches()">getDefaultUseCaches</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getListHTML(java.lang.String,%20boolean)">getListHTML</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getResource(java.lang.String)">getResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getWeakETag()">getWeakETag</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#isContainedIn(org.eclipse.jetty.util.resource.Resource,%20org.eclipse.jetty.util.resource.Resource)">isContainedIn</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newClassPathResource(java.lang.String)">newClassPathResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newClassPathResource(java.lang.String,%20boolean,%20boolean)">newClassPathResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newResource(java.io.File)">newResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newResource(java.lang.String)">newResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newResource(java.lang.String,%20boolean)">newResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newResource(java.net.URI)">newResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newResource(java.net.URL)">newResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#newSystemResource(java.lang.String)">newSystemResource</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#release()">release</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#setAssociate(java.lang.Object)">setAssociate</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#setDefaultUseCaches(boolean)">setDefaultUseCaches</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#toURL(java.io.File)">toURL</a>, <a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#writeTo(java.io.OutputStream,%20long,%20long)">writeTo</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></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="FileResource(java.net.URL)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FileResource</h4>
<pre>public&nbsp;FileResource(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;url)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URISyntaxException.html?is-external=true" title="class or interface in java.net">URISyntaxException</a></pre>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/net/URISyntaxException.html?is-external=true" title="class or interface in java.net">URISyntaxException</a></code></dd></dl>
</li>
</ul>
<a name="FileResource(java.net.URI)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>FileResource</h4>
<pre>public&nbsp;FileResource(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;uri)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="addPath(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addPath</h4>
<pre>public&nbsp;<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a>&nbsp;addPath(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
<a href="http://docs.oracle.com/javase/7/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</a></pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#addPath(java.lang.String)">Resource</a></code></strong></div>
<div class="block">Returns the resource contained inside the current resource with the
given name.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#addPath(java.lang.String)">addPath</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - The path segment to add, which is not encoded</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</a></code></dd></dl>
</li>
</ul>
<a name="getAlias()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAlias</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;getAlias()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getAlias()">getAlias</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The canonical Alias of this resource or null if none.</dd></dl>
</li>
</ul>
<a name="exists()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exists</h4>
<pre>public&nbsp;boolean&nbsp;exists()</pre>
<div class="block">Returns true if the resource exists.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#exists()">exists</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
</dl>
</li>
</ul>
<a name="lastModified()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lastModified</h4>
<pre>public&nbsp;long&nbsp;lastModified()</pre>
<div class="block">Returns the last modified time</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#lastModified()">lastModified</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
</dl>
</li>
</ul>
<a name="isDirectory()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDirectory</h4>
<pre>public&nbsp;boolean&nbsp;isDirectory()</pre>
<div class="block">Returns true if the resource is a container/directory.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#isDirectory()">isDirectory</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
</dl>
</li>
</ul>
<a name="length()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre>public&nbsp;long&nbsp;length()</pre>
<div class="block">Return the length of the resource</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#length()">length</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
</dl>
</li>
</ul>
<a name="getName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getName()</pre>
<div class="block">Returns the name of the resource</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getName()">getName</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
</dl>
</li>
</ul>
<a name="getFile()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFile</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getFile()</pre>
<div class="block">Returns an File representing the given resource or NULL if this
is not possible.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getFile()">getFile</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
</dl>
</li>
</ul>
<a name="getInputStream()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInputStream</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;getInputStream()
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Returns an input stream to the resource</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getInputStream()">getInputStream</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="getReadableByteChannel()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReadableByteChannel</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/ReadableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">ReadableByteChannel</a>&nbsp;getReadableByteChannel()
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getReadableByteChannel()">Resource</a></code></strong></div>
<div class="block">Returns an readable bytechannel to the resource or null if one is not available.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getReadableByteChannel()">getReadableByteChannel</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="delete()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>delete</h4>
<pre>public&nbsp;boolean&nbsp;delete()
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></pre>
<div class="block">Deletes the given resource</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#delete()">delete</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code></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&nbsp;boolean&nbsp;renameTo(<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a>&nbsp;dest)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></pre>
<div class="block">Rename the given resource</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#renameTo(org.eclipse.jetty.util.resource.Resource)">renameTo</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code></dd></dl>
</li>
</ul>
<a name="list()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>list</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;list()</pre>
<div class="block">Returns a list of resources contained in the given resource</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#list()">list</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
</dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;o)</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>o</code> - </dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> of the object <code>o</code> is a <a href="../../../../../org/eclipse/jetty/util/resource/FileResource.html" title="class in org.eclipse.jetty.util.resource"><code>FileResource</code></a> pointing to the same file as this resource.</dd></dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the hashcode.</dd></dl>
</li>
</ul>
<a name="copyTo(java.io.File)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyTo</h4>
<pre>public&nbsp;void&nbsp;copyTo(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;destination)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#copyTo(java.io.File)">copyTo</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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&nbsp;boolean&nbsp;isContainedIn(<a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a>&nbsp;r)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</a></pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#isContainedIn(org.eclipse.jetty.util.resource.Resource)">isContainedIn</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/net/MalformedURLException.html?is-external=true" title="class or interface in java.net">MalformedURLException</a></code></dd></dl>
</li>
</ul>
<a name="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#close()">Resource</a></code></strong></div>
<div class="block">Release any temporary resources held by the resource.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true#close()" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#close()">close</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
</dl>
</li>
</ul>
<a name="getURL()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getURL</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;getURL()</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getURL()">Resource</a></code></strong></div>
<div class="block">Returns an URL representing the given resource</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getURL()">getURL</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
</dl>
</li>
</ul>
<a name="getURI()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getURI</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>&nbsp;getURI()</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getURI()">Resource</a></code></strong></div>
<div class="block">Returns an URI representing the given resource</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html#getURI()">getURI</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/eclipse/jetty/util/resource/Resource.html" title="class in org.eclipse.jetty.util.resource">Resource</a></code></dd>
</dl>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/FileResource.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 class="aboutLanguage"><em><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1149868-7']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/eclipse/jetty/util/resource/EmptyResource.html" title="class in org.eclipse.jetty.util.resource"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/eclipse/jetty/util/resource/JarResource.html" title="class in org.eclipse.jetty.util.resource"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/jetty/util/resource/FileResource.html" target="_top">Frames</a></li>
<li><a href="FileResource.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields_inherited_from_class_org.eclipse.jetty.util.resource.Resource">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 1995-2017 <a href="http://webtide.com">Webtide</a>. All Rights Reserved.</small></p>
</body>
</html>