|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Resource
An interface to resources.
| Method Summary | |
|---|---|
long |
getCheckInterval()
Gets the interval of checking validity of the resource. |
byte[] |
getContents()
Gets the contents of the resource as bytes. |
InputStream |
getInputStream()
Gets the resource as a stream. |
long |
getLastModified()
Gets the resource modification time. |
long |
getLength()
Gets the length of the resource. |
String |
getName()
Gets the name of the resource. |
String |
getPath()
Gets the path of the resource. |
int |
getSizeLimit()
Gets the size limit for a cached resource. |
Object |
getSource()
Gets the source of the resource. |
boolean |
isDeleteOnRelease()
Checks whether the resource source should be deleted on release. |
boolean |
isValid()
Checks whether the original resource is still valid. |
void |
release()
Releases the cached resource. |
void |
setCheckInterval(long msecs)
Sets the interval of checking validity of the resource. |
void |
setDeleteOnRelease(boolean flag)
Sets whether the resource source should be deleted on release. |
void |
setPath(String path)
Sets the path of the resource. |
void |
setSizeLimit(int limit)
Sets a size limit for a resource. |
| Method Detail |
|---|
String getName()
Object getSource()
long getLength()
long getLastModified()
long getCheckInterval()
void setCheckInterval(long msecs)
msecs - the check interval in milliseconds (-1 = only once).boolean isDeleteOnRelease()
void setDeleteOnRelease(boolean flag)
flag - true if to be deleted, false otherwise.int getSizeLimit()
void setSizeLimit(int limit)
limit - a limit for a resource size in bytes (-1 = unlimited).String getPath()
void setPath(String path)
path - the path of the resource.
InputStream getInputStream()
throws IOException
IOException - on I/O errors.
byte[] getContents()
throws IOException
IOException - on I/O errors.boolean isValid()
void release()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||