public class EmptyResource extends Resource
| Modifier and Type | Field and Description |
|---|---|
static Resource |
INSTANCE |
__defaultUseCaches| Modifier and Type | Method and Description |
|---|---|
Resource |
addPath(String path)
Returns the resource contained inside the current resource with the
given name.
|
void |
close()
Release any temporary resources held by the resource.
|
boolean |
delete()
Deletes the given resource
|
boolean |
exists() |
File |
getFile()
File representing the given resource.
|
InputStream |
getInputStream()
Input stream to the resource
|
String |
getName()
The name of the resource.
|
ReadableByteChannel |
getReadableByteChannel()
Readable ByteChannel for the resource.
|
URL |
getURL()
URL representing the resource.
|
boolean |
isContainedIn(Resource r) |
boolean |
isDirectory() |
long |
lastModified()
Time resource was last modified.
|
long |
length()
Length of the resource.
|
String[] |
list()
list of resource names contained in the given resource.
|
boolean |
renameTo(Resource dest)
Rename the given resource
|
copyTo, encode, finalize, getAlias, getAllResources, getAssociate, getDefaultUseCaches, getListHTML, getResource, getURI, getWeakETag, getWeakETag, isAlias, isContainedIn, newClassPathResource, newClassPathResource, newResource, newResource, newResource, newResource, newResource, newSystemResource, release, setAssociate, setDefaultUseCaches, toURL, writeTopublic static final Resource INSTANCE
public boolean isContainedIn(Resource r) throws MalformedURLException
isContainedIn in class ResourceMalformedURLExceptionpublic void close()
Resourcepublic boolean exists()
public boolean isDirectory()
isDirectory in class Resourcepublic long lastModified()
ResourcelastModified in class Resourcepublic long length()
Resourcepublic File getFile() throws IOException
ResourcegetFile in class ResourceIOException - if unable to get the resource due to permissionspublic InputStream getInputStream() throws IOException
ResourcegetInputStream in class ResourceIOException - if unable to open the input streampublic ReadableByteChannel getReadableByteChannel() throws IOException
ResourcegetReadableByteChannel in class ResourceIOException - if unable to open the readable bytechannel for the resource.public boolean delete()
throws SecurityException
Resourcedelete in class ResourceSecurityException - if unable to delete due to permissionspublic boolean renameTo(Resource dest) throws SecurityException
ResourcerenameTo in class Resourcedest - the destination name for the resourceSecurityException - if unable to rename due to permissionspublic String[] list()
Resourcepublic Resource addPath(String path) throws IOException, MalformedURLException
ResourceaddPath in class Resourcepath - The path segment to add, which is not encodedIOException - if unable to resolve the pathMalformedURLException - if the resolution of the path fails because the input path parameter is malformed.Copyright © 1995-2015 Webtide. All Rights Reserved.