scalax.io

class CsvIterator

[source: scalax/io/CsvIterator.scala]

class CsvIterator(csv : java.io.Reader)
extends scala.Iterator[scala.Array[java.lang.String]]
An iterator interface to a CSV data stream: generates an array of strings representing each row. Note that the underlying Reader should be closed manually (or by a ManagedResource) if iteration is not completed.
Method Summary
def arity : Int
The number of fields each row should have. Default is 0, which means any number.
def commentStart : Char
The comment start character. Default '#'. Only effective if comments is true.
def comments : Boolean
If true, ignore blank lines and treat commentStart outside quotes as starting a comment line. Default is false.
def hasNext : Boolean
def next : scala.Array[java.lang.String]
def sep : Char
The separator character, a comma by default, but could be overridden to any character which is not whitespace or '"'.
Methods inherited from scala.Iterator
scala.Iterator.take, scala.Iterator.drop, scala.Iterator.slice, scala.Iterator.map, scala.Iterator.append, scala.Iterator.++, scala.Iterator.flatMap, scala.Iterator.filter, scala.Iterator.takeWhile, scala.Iterator.dropWhile, scala.Iterator.zip, scala.Iterator.zipWithIndex, scala.Iterator.foreach, scala.Iterator.forall, scala.Iterator.exists, scala.Iterator.contains, scala.Iterator.find, scala.Iterator.findIndexOf, scala.Iterator.indexOf, scala.Iterator.foldLeft, scala.Iterator.foldRight, scala.Iterator./:, scala.Iterator.:\, scala.Iterator.reduceLeft, scala.Iterator.reduceRight, scala.Iterator.buffered, scala.Iterator.counted, scala.Iterator.duplicate, scala.Iterator.copyToArray, scala.Iterator.readInto, scala.Iterator.readInto, scala.Iterator.readInto, scala.Iterator.copyToBuffer, scala.Iterator.toList, scala.Iterator.collect, scala.Iterator.mkString, scala.Iterator.mkString, scala.Iterator.mkString, scala.Iterator.addString, scala.Iterator.toString
Methods inherited from AnyRef
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
def sep : Char
The separator character, a comma by default, but could be overridden to any character which is not whitespace or '"'.

def arity : Int
The number of fields each row should have. Default is 0, which means any number.

def comments : Boolean
If true, ignore blank lines and treat commentStart outside quotes as starting a comment line. Default is false.

def commentStart : Char
The comment start character. Default '#'. Only effective if comments is true.

def hasNext : Boolean
Overrides
scala.Iterator.scala.Iterator.hasNext

def next : scala.Array[java.lang.String]
Overrides
scala.Iterator.scala.Iterator.next


Copyright (c) 2005-8 The Scalax Project. All Rights Reserved.