Download Latest Version csvscalpar-2.0.1.tgz (360.1 kB)
Email in envelope

Get an email when there's a new version of csvscalpar

Home / v1.0.0
Name Modified Size InfoDownloads / Week
Parent folder
README.txt 2016-03-05 2.3 kB
csvscalpar_1.0.0.tar.gz 2016-03-05 323.3 kB
Totals: 2 Items   325.6 kB 0
Overview
===============================================================================

csvscalpar is a csv file parser written in Scala for Scala developers.  This
api was written to conform with RFC-4180.  Although RFC-4180 does not define
a standard, it is a request for comment and is perhaps the beginning of a
standard for the csv file format.

See :  https://tools.ietf.org/html/rfc4180

There are two classes of interest for the Scala programmer.

1. CsvFileReader reads an input file into memory all at once and then
   parses the file.  The path and filename are the only required
   arguments to CsvFileReader's  readCsvFile() method.  The second argument
   is a boolean specifying whether you want to preserve embedded line feeds
   in text fields (the default is false; don't keep embedded line feeds).
   The third argument is a character argument specifying an alternate
   delimiter used in the file if the comma is not used as the delimiter.

2. CsvLineReader reads an input file in chunks of 512 characters and proesses
   the buffered input.  The readCsvFile() method has the same signature as
   its counterpart in the CsvFileReader class and fulfills the same goals.
   CsvLineReader is slower, but is intended to be easier on memory than
   CsvFileReader.

Using these classes is as simple as this :

  val reader = new CsvFileReader
  // The call below returns  List[List[String]]
  val result = reader.readCsvFile("path-and-file-name.csv")

or use the line reader class...

  val reader = new CsvLineReader
  // The call below returns  List[List[String]]
  val result = reader.readCsvFile("path-and-file-name.csv")

This software is released under the Apache 2 license, version 2.0.

   Copyright 2016 Clark Allen

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Source: README.txt, updated 2016-03-05