|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - - resource typepublic interface Resource<T>
The Resource object encapsulates the content. It is flexible on whether the content is stored in memory or on disk. The resource support a window of time for when the resource is valid.
| Method Summary | |
|---|---|
T |
getContent()
Get content of the resource. |
String |
getEncoding()
The resource may have a specific encoding. |
InputStream |
getInputStream()
|
String |
getMimeType()
Each resource holds content of a specific type. |
long |
getResourceLength()
The length of the resource in bytes |
long |
getValidFrom()
A resource may be valid from a point in time. |
long |
getValidUntil()
A resource may be valid only up to a point in time. |
void |
setContent(T content)
Apply content to the resource. |
| Method Detail |
|---|
long getValidFrom()
long getValidUntil()
String getMimeType()
String getEncoding()
long getResourceLength()
void setContent(T content)
content - May be the content itself or a reference such as a file url.T getContent()
InputStream getInputStream()
throws IOException
IOException - If a problem occurs opening the stream. Retrying wont help.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||