ResourceFactorypublic class EmptyResource extends Resource
| Modifier and Type | Field | Description |
|---|---|---|
static Resource |
INSTANCE |
__defaultUseCaches| Modifier and Type | Method | Description |
|---|---|---|
Resource |
addPath(java.lang.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() |
|
java.io.File |
getFile() |
File representing the given resource.
|
java.io.InputStream |
getInputStream() |
Input stream to the resource
|
java.lang.String |
getName() |
The name of the resource.
|
java.nio.channels.ReadableByteChannel |
getReadableByteChannel() |
Readable ByteChannel for the resource.
|
java.net.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.
|
java.lang.String[] |
list() |
list of resource names contained in the given resource.
|
boolean |
renameTo(Resource dest) |
Rename the given resource
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopyTo, 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 java.net.MalformedURLException
isContainedIn in class Resourcejava.net.MalformedURLExceptionpublic void close()
Resourcepublic boolean exists()
public boolean isDirectory()
isDirectory in class Resourcepublic long lastModified()
ResourcelastModified in class Resourcepublic long length()
Resourcepublic java.net.URL getURL()
Resourcepublic java.io.File getFile()
throws java.io.IOException
Resourcepublic java.lang.String getName()
Resourcepublic java.io.InputStream getInputStream()
throws java.io.IOException
ResourcegetInputStream in class Resourcejava.io.IOException - if unable to open the input streampublic java.nio.channels.ReadableByteChannel getReadableByteChannel()
throws java.io.IOException
ResourcegetReadableByteChannel in class Resourcejava.io.IOException - if unable to open the readable bytechannel for the resource.public boolean delete()
throws java.lang.SecurityException
Resourcepublic boolean renameTo(Resource dest) throws java.lang.SecurityException
Resourcepublic java.lang.String[] list()
Resourcepublic Resource addPath(java.lang.String path) throws java.io.IOException, java.net.MalformedURLException
ResourceaddPath in class Resourcepath - The path segment to add, which is not encodedjava.io.IOException - if unable to resolve the pathjava.net.MalformedURLException - if the resolution of the path fails because the input path parameter is malformed.Copyright © 1995–2018 Webtide. All rights reserved.