public class ApplicationPath extends AbstractPath
log| Constructor and Description |
|---|
ApplicationPath() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Returns true if the file can be read.
|
boolean |
exists(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Returns true if the file exists.
|
java.lang.String |
getAttribute(AttributeName name,
java.lang.String path,
HttpServletRequest request,
ServletContext app)
Returns an attribute value.
|
java.util.Iterator |
getAttributeNames(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Returns an iterator over the attribute names.
|
long |
getLastModified(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Returns the last modified time of the named file.
|
long |
getLength(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Returns the length of the named file.
|
protected Path |
getPath(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Returns the underlying path.
|
boolean |
isDirectory(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Returns true if the named file is a directory.
|
boolean |
isFile(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Returns true if the named file is a file.
|
java.lang.String[] |
list(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Returns a list of the files in the directory.
|
boolean |
mkdir(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Creates the named directory.
|
java.io.InputStream |
openRead(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Opens an InputStream for reading
|
java.io.OutputStream |
openWrite(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Opens an OutputStream for writing.
|
boolean |
remove(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Deletes the file
|
void |
removeAttribute(java.lang.String name,
java.lang.String path,
HttpServletRequest request,
ServletContext app)
Removes an attribute value.
|
boolean |
rmdir(java.lang.String path,
HttpServletRequest request,
ServletContext app)
Removes the named directory.
|
boolean |
setAttribute(AttributeName name,
java.lang.String value,
java.lang.String path,
HttpServletRequest request,
ServletContext app)
Sets an attribute value.
|
destroy, removeAttribute, renamepublic boolean isFile(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
isFile in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic boolean isDirectory(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
isDirectory in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic boolean canRead(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
canRead in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic boolean exists(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
exists in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic long getLength(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
getLength in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic long getLastModified(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
getLastModified in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic java.util.Iterator getAttributeNames(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
getAttributeNames in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic java.lang.String getAttribute(AttributeName name, java.lang.String path, HttpServletRequest request, ServletContext app) throws java.io.IOException
getAttribute in class AbstractPathname - the attribute namepath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic boolean setAttribute(AttributeName name, java.lang.String value, java.lang.String path, HttpServletRequest request, ServletContext app) throws java.io.IOException
setAttribute in class AbstractPathname - the attribute namevalue - the attribute valuepath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic void removeAttribute(java.lang.String name,
java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
name - the attribute namepath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic java.lang.String[] list(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
list in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic boolean mkdir(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
mkdir in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic boolean rmdir(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
rmdir in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic boolean remove(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
remove in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic java.io.OutputStream openWrite(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
openWrite in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionpublic java.io.InputStream openRead(java.lang.String path,
HttpServletRequest request,
ServletContext app)
throws java.io.IOException
openRead in class AbstractPathpath - the requested relative pathrequest - the servlet requestapp - the servlet contextjava.io.IOExceptionprotected Path getPath(java.lang.String path, HttpServletRequest request, ServletContext app) throws java.io.IOException
java.io.IOException