|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.util.resource.Resource
org.eclipse.jetty.util.resource.URLResource
org.eclipse.jetty.util.resource.FileResource
public class FileResource
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)
| 字段摘要 |
|---|
| 从类 org.eclipse.jetty.util.resource.URLResource 继承的字段 |
|---|
_connection, _in, _url, _urlString |
| 从类 org.eclipse.jetty.util.resource.Resource 继承的字段 |
|---|
__defaultUseCaches |
| 构造方法摘要 | |
|---|---|
FileResource(URL url)
|
|
| 方法摘要 | |
|---|---|
Resource |
addPath(String path)
Returns the resource contained inside the current resource with the given name |
void |
copyTo(File destination)
|
boolean |
delete()
Deletes the given resource |
String |
encode(String uri)
Encode according to this resource type. |
boolean |
equals(Object o)
|
boolean |
exists()
Returns true if the resource exists. |
URL |
getAlias()
|
static boolean |
getCheckAliases()
getCheckAliases. |
File |
getFile()
Returns an File representing the given resource or NULL if this is not possible. |
InputStream |
getInputStream()
Returns an input stream to the resource |
String |
getName()
Returns the name of the resource |
OutputStream |
getOutputStream()
Returns an output stream to the resource |
int |
hashCode()
|
boolean |
isDirectory()
Returns true if the respresenetd resource is a container/directory. |
long |
lastModified()
Returns the last modified time |
long |
length()
Return the length of the resource |
String[] |
list()
Returns a list of resources contained in the given resource |
boolean |
renameTo(Resource dest)
Rename the given resource |
static void |
setCheckAliases(boolean checkAliases)
setCheckAliases. |
| 从类 org.eclipse.jetty.util.resource.URLResource 继承的方法 |
|---|
checkConnection, getURL, getUseCaches, isContainedIn, release, toString |
| 从类 org.eclipse.jetty.util.resource.Resource 继承的方法 |
|---|
finalize, getAssociate, getDefaultUseCaches, getListHTML, getResource, getURI, getWeakETag, isContainedIn, newClassPathResource, newClassPathResource, newResource, newResource, newResource, newResource, newResource, newSystemResource, setAssociate, setDefaultUseCaches, toURL, writeTo |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public FileResource(URL url)
throws IOException,
URISyntaxException
IOException
URISyntaxException| 方法详细信息 |
|---|
public static void setCheckAliases(boolean checkAliases)
checkAliases - True of resource aliases are to be checked for (eg case insensitivity or 8.3 short names) and treated as not found.public static boolean getCheckAliases()
public Resource addPath(String path)
throws IOException,
MalformedURLException
URLResource 复制的描述
URLResource 中的 addPathpath - The path segment to add, which should be encoded by the
encode method.
IOException
MalformedURLExceptionpublic URL getAlias()
Resource 中的 getAliaspublic boolean exists()
URLResource 中的 existspublic long lastModified()
URLResource 中的 lastModifiedpublic boolean isDirectory()
URLResource 中的 isDirectorypublic long length()
URLResource 中的 lengthpublic String getName()
URLResource 中的 getNamepublic File getFile()
URLResource 中的 getFile
public InputStream getInputStream()
throws IOException
URLResource 中的 getInputStreamIOException
public OutputStream getOutputStream()
throws IOException,
SecurityException
URLResource 中的 getOutputStreamIOException
SecurityException
public boolean delete()
throws SecurityException
URLResource 中的 deleteSecurityException
public boolean renameTo(Resource dest)
throws SecurityException
URLResource 中的 renameToSecurityExceptionpublic String[] list()
URLResource 中的 listpublic String encode(String uri)
Resource 中的 encodeuri - URI to encode.
public boolean equals(Object o)
URLResource 中的 equalso -
true of the object o is a FileResource pointing to the same file as this resource.public int hashCode()
URLResource 中的 hashCode
public void copyTo(File destination)
throws IOException
Resource 中的 copyToIOException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||