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()
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
|
String |
getName()
Returns the name of the resource
|
ReadableByteChannel |
getReadableByteChannel()
Returns an readable bytechannel to the resource or null if one is not available.
|
URL |
getURL()
Returns an URL representing the given resource
|
boolean |
isContainedIn(Resource r) |
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
The resource names are not URL encoded.
|
boolean |
renameTo(Resource dest)
Rename the given resource
|
copyTo, encode, finalize, getAlias, getAllResources, getAssociate, getDefaultUseCaches, getListHTML, getResource, getURI, getWeakETag, isContainedIn, newClassPathResource, newClassPathResource, newResource, newResource, newResource, newResource, newResource, newSystemResource, release, setAssociate, setDefaultUseCaches, toURL, writeTo
public static final Resource INSTANCE
public boolean isContainedIn(Resource r) throws MalformedURLException
isContainedIn
in class Resource
MalformedURLException
public void close()
Resource
public boolean exists()
Resource
public boolean isDirectory()
Resource
isDirectory
in class Resource
public long lastModified()
Resource
lastModified
in class Resource
public long length()
Resource
public URL getURL()
Resource
public File getFile() throws IOException
Resource
getFile
in class Resource
IOException
public String getName()
Resource
public InputStream getInputStream() throws IOException
Resource
getInputStream
in class Resource
IOException
public ReadableByteChannel getReadableByteChannel() throws IOException
Resource
getReadableByteChannel
in class Resource
IOException
public boolean delete() throws SecurityException
Resource
delete
in class Resource
SecurityException
public boolean renameTo(Resource dest) throws SecurityException
Resource
renameTo
in class Resource
SecurityException
public String[] list()
Resource
public Resource addPath(String path) throws IOException, MalformedURLException
Resource
addPath
in class Resource
path
- The path segment to add, which is not encodedIOException
MalformedURLException
Copyright © 1995-2015 Webtide. All Rights Reserved.