JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table.data
Class JCCSVFormatParser

java.lang.Object
  |
  +--com.klg.jclass.table.data.JCCSVFormatParser
All Implemented Interfaces:
JCFileFormatParser

public class JCCSVFormatParser
extends Object
implements JCFileFormatParser

This class takes in a stream of data, which is assumed to be in CSV format. It parses it, then puts the data inside a JCVectorDataSource instance.

See Also:
JCCSVParser

Field Summary
protected  StreamTokenizer tokenizer
          Stream tokenizer used to parse the input stream.
 
Constructor Summary
JCCSVFormatParser()
           
 
Method Summary
protected  void initTokenizer(Reader r)
          Creates and sets up a valid tokenizer active on the provided stream.
 void readAndParse(Reader r, com.klg.jclass.table.data.JCVectorDataSource ds)
          Reads and parses CSV-formatted data and places it inside a LiveTable data source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tokenizer

protected StreamTokenizer tokenizer
Stream tokenizer used to parse the input stream.

Constructor Detail

JCCSVFormatParser

public JCCSVFormatParser()
Method Detail

initTokenizer

protected void initTokenizer(Reader r)
Creates and sets up a valid tokenizer active on the provided stream.

Parameters:
r - reader open on an active stream

readAndParse

public void readAndParse(Reader r,
                         com.klg.jclass.table.data.JCVectorDataSource ds)
                  throws IOException
Reads and parses CSV-formatted data and places it inside a LiveTable data source.

Specified by:
readAndParse in interface JCFileFormatParser
Parameters:
r - reader open on an active stream
ds - JCVectorDataSource instance to act as a container for the data read in from r
Throws:
IOException
See Also:
JCCSVParser

Copyright © 2004 Quest Software Inc..
All rights reserved.