public class CDataSourceSingleFile extends java.lang.Object implements IDataSource
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
m_filename
This member represents the input filename
|
protected java.io.FileInputStream |
m_inputStream
This member represents the input stream to read from.
|
protected java.io.BufferedReader |
m_reader
This member is actually used for reading data.
|
protected COSARReporter |
m_reporter
This member is used for reporting.
|
EOF
Constructor and Description |
---|
CDataSourceSingleFile(java.lang.String filename) |
Modifier and Type | Method and Description |
---|---|
boolean |
end()
This function is called to end reading.
|
protected void |
error(java.lang.String fName,
java.lang.String msg) |
COSARReporter |
getReporter() |
java.lang.String |
getSourceName() |
boolean |
hasMoreData() |
boolean |
initialize()
This function is called to initialize the data source.
|
boolean |
isHealthy() |
char |
nextChar() |
int |
read(char[] buf,
int len)
This function reads a given number of characters from the source.
|
boolean |
setBookmark(int lineNo)
This function is called to mark a certain position in the input
stream.
|
void |
setReporter(COSARReporter reporter) |
boolean |
start()
This function is called to start reading.
|
boolean |
terminate()
This function is called to terminate the data source.
|
protected java.lang.String m_filename
protected java.io.FileInputStream m_inputStream
protected java.io.BufferedReader m_reader
protected COSARReporter m_reporter
public CDataSourceSingleFile(java.lang.String filename) throws java.lang.Exception
java.lang.Exception
public COSARReporter getReporter()
public void setReporter(COSARReporter reporter)
public java.lang.String getSourceName()
getSourceName
in interface IDataSource
public boolean hasMoreData()
hasMoreData
in interface IDataSource
public char nextChar() throws java.lang.Exception
nextChar
in interface IDataSource
java.lang.Exception
public int read(char[] buf, int len) throws java.lang.Exception
IDataSource
read
in interface IDataSource
java.lang.Exception
public boolean initialize()
IDataSource
initialize
in interface IDataSource
public boolean terminate()
IDataSource
terminate
in interface IDataSource
public boolean start()
IDataSource
start
in interface IDataSource
public boolean end()
IDataSource
end
in interface IDataSource
public boolean setBookmark(int lineNo)
IDataSource
setBookmark
in interface IDataSource
public boolean isHealthy()
isHealthy
in interface IDataSource
protected void error(java.lang.String fName, java.lang.String msg)