|
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 echopoint.template.StreamDataSource
A StreamDataSource
implements a DataSource
as a wrapper around a Stream or Reader
Field Summary |
Fields inherited from class echopoint.template.AbstractDataSource |
DEFAULT_ENCODING |
Constructor Summary | |
StreamDataSource(java.io.InputStream iStream)
generates a new StreamDataSource with the given Stream |
|
StreamDataSource(java.io.InputStream iStream,
java.lang.String encoding)
generates a new StreamDataSource with the given Stream |
Method Summary | |
java.lang.String |
getCanonicalName()
returns the canonical name of the inputStream (uaaaah!) |
java.io.Reader |
getInputReader()
Gets an Reader of the File. |
long |
lastModified()
Returns the time the content of this stream was last modified. |
void |
setInputStream(java.io.InputStream iStream)
sets the InputStream and the modificationTime |
void |
setModificationTime()
sets the modificationTime to the currentTimeMillis |
void |
setReader(java.io.Reader iReader)
sets the Reader and the modificationTime to the currentTimeMillis |
Methods inherited from class echopoint.template.AbstractDataSource |
getCharacterEncoding, setCharacterEncoding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StreamDataSource(java.io.InputStream iStream) throws java.io.UnsupportedEncodingException
generates a new StreamDataSource with the given Stream
iStream
- the InputStream from which the template is read.public StreamDataSource(java.io.InputStream iStream, java.lang.String encoding) throws java.io.UnsupportedEncodingException
generates a new StreamDataSource with the given Stream
iStream
- the InputStream from which the template is read.Method Detail |
public java.lang.String getCanonicalName()
returns the canonical name of the inputStream (uaaaah!)
getCanonicalName
in interface DataSource
getCanonicalName
in class AbstractDataSource
always null, because stream is always to be parsed
public java.io.Reader getInputReader() throws java.io.IOException
getInputReader
in interface DataSource
getInputReader
in class AbstractDataSource
java.io.IOException
public long lastModified()
Returns the time the content of this stream was last modified.
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.
Attention: Modificationtime is only updated if a new stream is set!
lastModified
in interface DataSource
lastModified
in class AbstractDataSource
public void setInputStream(java.io.InputStream iStream) throws java.io.UnsupportedEncodingException
sets the InputStream and the modificationTime
iStream
- the InputStream from which the template is read.
java.io.UnsupportedEncodingException
public void setModificationTime()
sets the modificationTime to the currentTimeMillis
public void setReader(java.io.Reader iReader)
sets the Reader and the modificationTime to the currentTimeMillis
iReader
- the Reader from which the template is read.
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |