|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object echopoint.template.AbstractDataSource
A base class for DataSources implementation
Field Summary | |
static java.lang.String |
DEFAULT_ENCODING
the default encoding is iso-8859-1 |
Constructor Summary | |
AbstractDataSource()
AbstractDataSource constructor with encoding. |
|
AbstractDataSource(java.lang.String encoding)
AbstractDataSource constructor with encoding. |
Method Summary | |
abstract java.lang.String |
getCanonicalName()
Returns a canonical name of this DataSource. |
java.lang.String |
getCharacterEncoding()
Returns the encoding used by the DataSource |
abstract java.io.Reader |
getInputReader()
Gets an Reader of this DataSource. |
abstract long |
lastModified()
Returns the time the content of this DataSource was last modified. |
void |
setCharacterEncoding(java.lang.String newEncoding)
Sets the encoding used by the data source |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String DEFAULT_ENCODING
Constructor Detail |
public AbstractDataSource()
public AbstractDataSource(java.lang.String encoding)
Method Detail |
public abstract java.lang.String getCanonicalName()
The name returned here is used to look up the parsing
result of the internal caching, so it should differ
for all different Sources :-)
May return null
if this Source is supposed
to be parsed each time. The canonical name would be something
like a filename or an URL.
getCanonicalName
in interface DataSource
public java.lang.String getCharacterEncoding()
getCharacterEncoding
in interface DataSource
public abstract java.io.Reader getInputReader() throws java.io.IOException
Note that this method may be called twice if the page has to be parsed first. So you probably have to implement a buffer if your underlying source is transient ..
getInputReader
in interface DataSource
java.io.IOException
public abstract long lastModified()
The return value is used to decide whether to reparse a Source or not. Reparsing is done if the value returned here differs from the value returned at the last processing time. This may not return a 'real' time, it needs just to be comparable to itself; so some sort of version counter would be perfect as well.
lastModified
in interface DataSource
public void setCharacterEncoding(java.lang.String newEncoding)
newEncoding
- java.lang.String
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |