|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 URLResourcepublic long lastModified()
URLResource
lastModified in class URLResourcepublic boolean isDirectory()
URLResource
isDirectory in class URLResourcepublic long length()
URLResource
length in class URLResourcepublic File getFile()
URLResource
getFile in class URLResource
public InputStream getInputStream()
throws IOException
URLResource
getInputStream in class URLResourceIOException
public OutputStream getOutputStream()
throws IOException,
SecurityException
URLResource
getOutputStream in class URLResourceIOException
SecurityException
public boolean delete()
throws SecurityException
URLResource
delete in class URLResourceSecurityException
public boolean renameTo(Resource dest)
throws SecurityException
URLResource
renameTo in class URLResourceSecurityExceptionpublic String[] list()
URLResource
list in class URLResourcepublic String toString()
toString in class URLResource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||