|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--at.ac.tuwien.infosys.rnue.helpers.http.SimpleDocument
A class that describing simple documents. I.e., documents represented by a string. An object of the SimpleDocument class can be used as container for an HTML page available as string.
Constructor Summary | |
SimpleDocument(java.lang.String content,
boolean cacheable)
Constructs a SimpleDocument. |
Method Summary | |
java.lang.String |
getCachingInfo()
Returns a java.lang.String representing the caching info of the document. |
java.io.InputStream |
getContent()
Returns a java.io.InputStream representing the content of the document. |
long |
getContentLength()
Returns the length of the content as integer. |
java.lang.String |
getContentType()
Returns the content type of the document. |
java.util.Date |
getLastModified()
Returns the last modification date. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleDocument(java.lang.String content, boolean cacheable)
content
- java.lang.String representing the content of the
HTML page.cacheable
- boolean indicating whether this document can be
cached.Method Detail |
public java.util.Date getLastModified()
getLastModified
in interface IDocument
public java.lang.String getContentType()
getContentType
in interface IDocument
public long getContentLength()
getContentLength
in interface IDocument
public java.io.InputStream getContent()
getContent
in interface IDocument
public java.lang.String getCachingInfo()
getCachingInfo
in interface IDocument
true
this method returns null
. When the cacheable value
is set to false
the following string is returned:
"Cache-Control: no-cache\r\n"+"Expires: " +
RFC1123DateFormatter.format(new Date()) + "\r\n"
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |