public abstract class AbstractResource
extends java.lang.Object
implements org.frameworkset.util.io.Resource
Title: AbstractResource.java
Description:
bboss workgroup
Copyright (c) 2007
| 限定符和类型 | 字段和说明 |
|---|---|
protected long |
savesize |
| 构造器和说明 |
|---|
AbstractResource() |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
contentLength()
This implementation checks the timestamp of the underlying File,
if available.
|
org.frameworkset.util.io.Resource |
createRelative(java.lang.String relativePath)
This implementation throws a FileNotFoundException, assuming
that relative resources cannot be created for this resource.
|
boolean |
equals(java.lang.Object obj)
This implementation compares description strings.
|
boolean |
exists()
This implementation checks whether a File can be opened,
falling back to whether an InputStream can be opened.
|
java.io.File |
getFile()
This implementation throws a FileNotFoundException, assuming
that the resource cannot be resolved to an absolute file path.
|
protected java.io.File |
getFileForLastModifiedCheck()
Determine the File to use for timestamp checking.
|
java.lang.String |
getFilename()
This implementation always throws IllegalStateException,
assuming that the resource does not carry a filename.
|
long |
getSavesize() |
java.net.URI |
getURI()
This implementation builds a URI based on the URL returned
by
getURL(). |
java.net.URL |
getURL()
This implementation throws a FileNotFoundException, assuming
that the resource cannot be resolved to a URL.
|
int |
hashCode()
This implementation returns the description's hash code.
|
boolean |
isOpen()
This implementation always returns
false. |
boolean |
isReadable()
This implementation always returns
true. |
long |
lastModified()
This implementation checks the timestamp of the underlying File,
if available.
|
void |
release() |
void |
savetofile(java.io.File destinctionFile) |
void |
savetofile(java.io.File destinctionFile,
ResourceHandleListener<AbstractResource> listener) |
java.lang.String |
toString()
This implementation returns the description of this resource.
|
public boolean exists()
exists 在接口中 org.frameworkset.util.io.Resourcepublic boolean isReadable()
true.isReadable 在接口中 org.frameworkset.util.io.Resourcepublic boolean isOpen()
false.isOpen 在接口中 org.frameworkset.util.io.Resourcepublic java.net.URL getURL()
throws java.io.IOException
getURL 在接口中 org.frameworkset.util.io.Resourcejava.io.IOExceptionpublic java.net.URI getURI()
throws java.io.IOException
getURL().getURI 在接口中 org.frameworkset.util.io.Resourcejava.io.IOExceptionpublic java.io.File getFile()
throws java.io.IOException
getFile 在接口中 org.frameworkset.util.io.Resourcejava.io.IOExceptionpublic long lastModified()
throws java.io.IOException
lastModified 在接口中 org.frameworkset.util.io.Resourcejava.io.IOExceptiongetFileForLastModifiedCheck()public long contentLength()
throws java.io.IOException
contentLength 在接口中 org.frameworkset.util.io.Resourcejava.io.IOExceptiongetFile()protected java.io.File getFileForLastModifiedCheck()
throws java.io.IOException
The default implementation delegates to getFile().
null)java.io.IOException - if the resource cannot be resolved as absolute
file path, i.e. if the resource is not available in a file systempublic org.frameworkset.util.io.Resource createRelative(java.lang.String relativePath)
throws java.io.IOException
createRelative 在接口中 org.frameworkset.util.io.Resourcejava.io.IOExceptionpublic java.lang.String getFilename()
throws java.lang.IllegalStateException
getFilename 在接口中 org.frameworkset.util.io.Resourcejava.lang.IllegalStateExceptionpublic java.lang.String toString()
toString 在类中 java.lang.ObjectResource.getDescription()public boolean equals(java.lang.Object obj)
equals 在类中 java.lang.ObjectResource.getDescription()public int hashCode()
hashCode 在类中 java.lang.ObjectResource.getDescription()public void release()
release 在接口中 org.frameworkset.util.io.Resourcepublic void savetofile(java.io.File destinctionFile,
ResourceHandleListener<AbstractResource> listener)
throws java.io.IOException
java.io.IOExceptionpublic void savetofile(java.io.File destinctionFile)
throws java.io.IOException
java.io.IOExceptionpublic long getSavesize()