EchoPoint
1.0

echopoint.template
Class ReaderDataSource

java.lang.Object
  extended byechopoint.template.AbstractDataSource
      extended byechopoint.template.ReaderDataSource
All Implemented Interfaces:
DataSource, java.io.Serializable

public class ReaderDataSource
extends AbstractDataSource

A ReaderDataSource implements a DataSource for a java.io.Reader.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class echopoint.template.AbstractDataSource
DEFAULT_ENCODING
 
Constructor Summary
ReaderDataSource(java.io.Reader r)
          Creates a ReaderDataSource without an specific character encoding.
 
Method Summary
 java.lang.String getCanonicalName()
          Returns a canonical name of this DataSource.
 java.io.Reader getInputReader()
          Gets an Reader of the File.
 long lastModified()
          Returns the time the content of this Reader was last modified.
 
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

ReaderDataSource

public ReaderDataSource(java.io.Reader r)
Creates a ReaderDataSource without an specific character encoding. The prior Reader contruction is assumed to have handeld character encoding.

Method Detail

getCanonicalName

public java.lang.String getCanonicalName()
Returns a canonical name of this DataSource.

Specified by:
getCanonicalName in interface DataSource
Specified by:
getCanonicalName in class AbstractDataSource

getInputReader

public java.io.Reader getInputReader()
                              throws java.io.IOException
Gets an Reader of the File.

Specified by:
getInputReader in interface DataSource
Specified by:
getInputReader in class AbstractDataSource
Throws:
java.io.IOException

lastModified

public long lastModified()
Returns the time the content of this Reader was last modified. Always returns 1;

Specified by:
lastModified in interface DataSource
Specified by:
lastModified in class AbstractDataSource
Returns:
long a modification time

EchoPoint
1.0