class BadResource extends URLResource
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
_message |
_connection, _in, _url, _urlString, _useCaches__defaultUseCaches, _associate| Constructor and Description |
|---|
BadResource(java.net.URL url,
java.lang.String message) |
| Modifier and Type | Method and Description |
|---|---|
void |
copyTo(java.io.File destination)
Copy the Resource to the new destination file.
|
boolean |
delete()
Deletes the given resource
|
boolean |
exists()
Returns true if the represented resource exists.
|
java.io.File |
getFile()
Returns an File representing the given resource or NULL if this
is not possible.
|
java.io.InputStream |
getInputStream()
Returns an input stream to the resource.
|
boolean |
isDirectory()
Returns true if the represented resource is a container/directory.
|
long |
lastModified()
Returns the last modified time
|
long |
length()
Return the length of the resource
|
java.lang.String[] |
list()
Returns a list of resource names contained in the given resource
|
boolean |
renameTo(Resource dest)
Rename the given resource
|
java.lang.String |
toString() |
addPath, checkConnection, close, equals, getInputStream, getName, getReadableByteChannel, getURL, getUseCaches, hashCode, isContainedInencode, finalize, getAlias, getAllResources, getAssociate, getDefaultUseCaches, getListHTML, getResource, getURI, getWeakETag, getWeakETag, isAlias, isContainedIn, newClassPathResource, newClassPathResource, newResource, newResource, newResource, newResource, newResource, newResource, newSystemResource, release, setAssociate, setDefaultUseCaches, toURL, writeTopublic boolean exists()
URLResourceexists in class URLResourcepublic long lastModified()
URLResourcelastModified in class URLResourcepublic boolean isDirectory()
URLResourceisDirectory in class URLResourcepublic long length()
URLResourcelength in class URLResourcepublic java.io.File getFile()
URLResourcegetFile in class URLResourcepublic java.io.InputStream getInputStream()
throws java.io.IOException
URLResourcegetInputStream in class URLResourcejava.io.IOException - if unable to open the input streampublic boolean delete()
throws java.lang.SecurityException
URLResourcedelete in class URLResourcejava.lang.SecurityException - if unable to delete due to permissionspublic boolean renameTo(Resource dest) throws java.lang.SecurityException
URLResourcerenameTo in class URLResourcedest - the destination name for the resourcejava.lang.SecurityException - if unable to rename due to permissionspublic java.lang.String[] list()
URLResourcelist in class URLResourcepublic void copyTo(java.io.File destination)
throws java.io.IOException
ResourceWill not replace existing destination file.
public java.lang.String toString()
toString in class URLResource