Package com.ibm.di.parser
Class FixedRecordParser
- java.lang.Object
-
- com.ibm.di.parser.ParserImpl
-
- com.ibm.di.parser.FixedRecordParser
-
- All Implemented Interfaces:
ParserInterface
,VersionInfoInterface
public class FixedRecordParser extends ParserImpl
The Fixed Parser reads and writes fixed length text records.
-
-
Field Summary
-
Fields inherited from class com.ibm.di.parser.ParserImpl
_debug, myConfiguration
-
-
Constructor Summary
Constructors Constructor Description FixedRecordParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getVersion()
Version information.void
initParser()
This method is called by the hosting component (e.g.java.lang.Object
querySchema(java.lang.Object source)
Discover the schema for the Parser.Entry
readEntry()
Return the next entry from the current input stream.void
writeEntry(Entry e)
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()
This method is called by the hosting component (e.g. connector) to initialize the parser.- Specified by:
initParser
in interfaceParserInterface
- Overrides:
initParser
in classParserImpl
-
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 an I/O error occurs.
-
writeEntry
public void writeEntry(Entry e) throws java.lang.Exception
Write an entry to the current output stream.- Parameters:
e
- The entry to write- Throws:
java.lang.Exception
- if an I/O error occurs.
-
querySchema
public java.lang.Object querySchema(java.lang.Object source) throws java.lang.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 interfaceParserInterface
- Overrides:
querySchema
in 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
-
-