| |
|
| java.lang.Object org.mortbay.resource.Resource org.mortbay.resource.URLResource org.mortbay.resource.FileResource
FileResource | public class FileResource extends URLResource (Code) | | 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 with the
"org.mortbay.util.FileResource.checkAliases" system parameter.
author: Greg Wilkins (gregw) |
encode | public String encode(String uri)(Code) | | Encode according to this resource type.
File URIs are encoded.
Parameters: uri - URI to encode. The uri unchanged. |
equals | public boolean equals(Object o)(Code) | | Parameters: o - true of the object o is a FileResource pointing to the same file as this resource. |
exists | public boolean exists()(Code) | | Returns true if the resource exists.
|
getCheckAliases | public static boolean getCheckAliases()(Code) | | getCheckAliases.
True of resource aliases are to be checked for (eg case insensitivity or 8.3 short names) and treated as not found. |
getFile | public File getFile()(Code) | | Returns an File representing the given resource or NULL if this
is not possible.
|
getName | public String getName()(Code) | | Returns the name of the resource
|
hashCode | public int hashCode()(Code) | | the hashcode. |
isDirectory | public boolean isDirectory()(Code) | | Returns true if the respresenetd resource is a container/directory.
|
lastModified | public long lastModified()(Code) | | Returns the last modified time
|
length | public long length()(Code) | | Return the length of the resource
|
list | public String[] list()(Code) | | Returns a list of resources contained in the given resource
|
setCheckAliases | public static void setCheckAliases(boolean checkAliases)(Code) | | setCheckAliases.
Parameters: checkAliases - True of resource aliases are to be checked for (eg case insensitivity or 8.3 short names) and treated as not found. |
Methods inherited from org.mortbay.resource.Resource | abstract public Resource addPath(String path) throws IOException, MalformedURLException(Code)(Java Doc) abstract public boolean delete() throws SecurityException(Code)(Java Doc) public String encode(String uri)(Code)(Java Doc) abstract public boolean exists()(Code)(Java Doc) protected void finalize()(Code)(Java Doc) public URL getAlias()(Code)(Java Doc) public Object getAssociate()(Code)(Java Doc) public static boolean getDefaultUseCaches()(Code)(Java Doc) abstract public File getFile() throws IOException(Code)(Java Doc) abstract public InputStream getInputStream() throws java.io.IOException(Code)(Java Doc) public String getListHTML(String base, boolean parent) throws IOException(Code)(Java Doc) abstract public String getName()(Code)(Java Doc) abstract public OutputStream getOutputStream() throws java.io.IOException, SecurityException(Code)(Java Doc) abstract public URL getURL()(Code)(Java Doc) abstract public boolean isDirectory()(Code)(Java Doc) abstract public long lastModified()(Code)(Java Doc) abstract public long length()(Code)(Java Doc) abstract public String[] list()(Code)(Java Doc) public static Resource newClassPathResource(String resource)(Code)(Java Doc) public static Resource newClassPathResource(String name, boolean useCaches, boolean checkParents)(Code)(Java Doc) public static Resource newResource(URL url) throws IOException(Code)(Java Doc) public static Resource newResource(URL url, boolean useCaches)(Code)(Java Doc) public static Resource newResource(String resource) throws MalformedURLException, IOException(Code)(Java Doc) public static Resource newResource(String resource, boolean useCaches) throws MalformedURLException, IOException(Code)(Java Doc) public static Resource newSystemResource(String resource) throws IOException(Code)(Java Doc) abstract public void release()(Code)(Java Doc) abstract public boolean renameTo(Resource dest) throws SecurityException(Code)(Java Doc) public void setAssociate(Object o)(Code)(Java Doc) public static void setDefaultUseCaches(boolean useCaches)(Code)(Java Doc) public void writeTo(OutputStream out, long start, long count) throws IOException(Code)(Java Doc)
|
|
|
|