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, isContainedIn
encode, 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, writeTo
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 java.io.File getFile()
URLResource
getFile
in class URLResource
public java.io.InputStream getInputStream() throws java.io.IOException
URLResource
getInputStream
in class URLResource
java.io.IOException
- if unable to open the input streampublic boolean delete() throws java.lang.SecurityException
URLResource
delete
in class URLResource
java.lang.SecurityException
- if unable to delete due to permissionspublic boolean renameTo(Resource dest) throws java.lang.SecurityException
URLResource
renameTo
in class URLResource
dest
- the destination name for the resourcejava.lang.SecurityException
- if unable to rename due to permissionspublic java.lang.String[] list()
URLResource
list
in class URLResource
public void copyTo(java.io.File destination) throws java.io.IOException
Resource
Will not replace existing destination file.
public java.lang.String toString()
toString
in class URLResource