com.ibm.di.parser
Class LineReader

java.lang.Object
  extended by com.ibm.di.parser.ParserImpl
      extended by com.ibm.di.parser.LineReader
All Implemented Interfaces:
ParserInterface, VersionInfoInterface

public class LineReader
extends ParserImpl

The Line Reader Parser reads single lines of data. The line read is returned in a single attribute. There is also an attribute named linenumber that contains the line number, starting with 1.


Field Summary
 
Fields inherited from class com.ibm.di.parser.ParserImpl
_debug, myConfiguration
 
Constructor Summary
LineReader()
           
 
Method Summary
 String getVersion()
          Version information.
 void initParser()
          This method is called by the hosting component (e.g.
 Object querySchema(Object source)
          Discover the schema for the Parser.
 Entry readEntry()
          Return the next entry from the current input stream.
 void writeEntry(Entry entry)
          Write an entry to the current output stream.
 
Methods inherited from class com.ibm.di.parser.ParserImpl
closeParser, debug, debugMode, flush, getClassInstance, getContext, getDebug, getInputStream, getOutputStream, getParam, getParser, getReader, getWriter, isDeltaSupported, logmsg, registerScriptBeans, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineReader

public LineReader()
Method Detail

initParser

public void initParser()
                throws Exception
This method is called by the hosting component (e.g. connector) to initialize the parser.

Specified by:
initParser in interface ParserInterface
Overrides:
initParser in class ParserImpl
Throws:
Exception - : never

writeEntry

public void writeEntry(Entry entry)
                throws Exception
Write an entry to the current output stream.

Parameters:
entry - The entry to write
Throws:
Exception - if an I/O error occurs.

readEntry

public Entry readEntry()
                throws Exception
Return the next entry from the current input stream.

Returns:
The next entry from the input stream
Throws:
Exception - if error occurs.

querySchema

public Object querySchema(Object source)
                   throws Exception
Discover the schema for the Parser. For example, a XML Parser could return a representation of the XML Schema or the DTD referenced in a XML file.

Specified by:
querySchema in interface ParserInterface
Overrides:
querySchema in class ParserImpl
Parameters:
source - The object on which to discover schema
Returns:
A Vector of com.ibm.di.entry.Entry objects describing each entity
Throws:
Exception - If an I/O error occurs
Since:
7.0

getVersion

public String getVersion()
Version information.

Returns:
version information