Package com.ibm.di.parser
Class LineReader
- java.lang.Object
-
- com.ibm.di.parser.ParserImpl
-
- 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
Constructors Constructor Description LineReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetVersion()Version information.voidinitParser()This method is called by the hosting component (e.g.java.lang.ObjectquerySchema(java.lang.Object source)Discover the schema for the Parser.EntryreadEntry()Return the next entry from the current input stream.voidwriteEntry(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
-
-
-
-
Method Detail
-
initParser
public void initParser() throws java.lang.ExceptionThis method is called by the hosting component (e.g. connector) to initialize the parser.- Specified by:
initParserin interfaceParserInterface- Overrides:
initParserin classParserImpl- Throws:
java.lang.Exception- : never
-
writeEntry
public void writeEntry(Entry entry) throws java.lang.Exception
Write an entry to the current output stream.- Parameters:
entry- The entry to write- Throws:
java.lang.Exception- if an I/O error occurs.
-
readEntry
public Entry readEntry() throws java.lang.Exception
Return the next entry from the current input stream.- Returns:
- The next entry from the input stream
- Throws:
java.lang.Exception- if error occurs.
-
querySchema
public java.lang.Object querySchema(java.lang.Object source) throws java.lang.ExceptionDiscover 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:
querySchemain interfaceParserInterface- Overrides:
querySchemain classParserImpl- Parameters:
source- The object on which to discover schema- Returns:
- A Vector of com.ibm.di.entry.Entry objects describing each entity
- Throws:
java.lang.Exception- If an I/O error occurs- Since:
- 7.0
-
getVersion
public java.lang.String getVersion()
Version information.- Returns:
- version information
-
-