com.ibm.di.parser
Class CSVParser

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

public class CSVParser
extends ParserImpl

A class reading and writing dsEntries in a simple one-line-per-attribute format. For example:

    Window win = new Window(parent);
    wgetReader().show();
 

See Also:
Connector

Field Summary
 
Fields inherited from class com.ibm.di.parser.ParserImpl
_debug, myConfiguration
 
Constructor Summary
CSVParser()
           
CSVParser(Reader in, Writer out)
           
 
Method Summary
 String getVersion()
          Return version information
 void initParser()
          Perform initialization of parser.
 ArrayList nextEntry()
           
 String quote(String src)
           
 Entry readEntry()
          Return the next entry from the current input stream
 void setHeadersWritten(boolean value)
           
 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

CSVParser

public CSVParser()

CSVParser

public CSVParser(Reader in,
                 Writer out)
Method Detail

initParser

public void initParser()
Description copied from class: ParserImpl
Perform initialization of parser.

Specified by:
initParser in interface ParserInterface
Overrides:
initParser in class ParserImpl

readEntry

public Entry readEntry()
                throws IOException
Description copied from interface: ParserInterface
Return the next entry from the current input stream

Returns:
The next entry from the input stream
Throws:
IOException

nextEntry

public ArrayList nextEntry()
                    throws IOException
Throws:
IOException

writeEntry

public void writeEntry(Entry entry)
                throws Exception
Description copied from interface: ParserInterface
Write an entry to the current output stream

Parameters:
entry - The entry to write
Throws:
Exception

quote

public String quote(String src)

setHeadersWritten

public void setHeadersWritten(boolean value)

getVersion

public String getVersion()
Return version information