|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.resource.Resource org.mortbay.resource.URLResource org.mortbay.resource.BadResource
class BadResource
Bad Resource. A Resource that is returned for a bade URL. Acts as a resource that does not exist and throws appropriate exceptions.
Field Summary | |
---|---|
private String |
_message
|
Fields inherited from class org.mortbay.resource.URLResource |
---|
_connection, _in, _url, _urlString |
Fields inherited from class org.mortbay.resource.Resource |
---|
_associate |
Constructor Summary | |
---|---|
BadResource(URL url,
String message)
|
Method Summary | |
---|---|
boolean |
delete()
Deletes the given resource |
boolean |
exists()
Returns true if the respresened resource exists. |
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 |
OutputStream |
getOutputStream()
Returns an output stream to the resource |
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 resource names contained in the given resource |
boolean |
renameTo(Resource dest)
Rename the given resource |
String |
toString()
|
Methods inherited from class org.mortbay.resource.URLResource |
---|
addPath, checkConnection, equals, getName, getURL, hashCode, release |
Methods inherited from class org.mortbay.resource.Resource |
---|
encode, finalize, getAlias, getAssociate, getListHTML, newResource, newResource, newSystemResource, setAssociate, writeTo |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private String _message
Constructor Detail |
---|
BadResource(URL url, String message)
Method Detail |
---|
public boolean exists()
URLResource
exists
in class URLResource
public long lastModified()
URLResource
lastModified
in class URLResource
public boolean isDirectory()
URLResource
isDirectory
in class URLResource
public long length()
URLResource
length
in class URLResource
public File getFile()
URLResource
getFile
in class URLResource
public InputStream getInputStream() throws IOException
URLResource
getInputStream
in class URLResource
IOException
public OutputStream getOutputStream() throws IOException, SecurityException
URLResource
getOutputStream
in class URLResource
IOException
SecurityException
public boolean delete() throws SecurityException
URLResource
delete
in class URLResource
SecurityException
public boolean renameTo(Resource dest) throws SecurityException
URLResource
renameTo
in class URLResource
SecurityException
public String[] list()
URLResource
list
in class URLResource
public String toString()
toString
in class URLResource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |