com.datasalt.pangool.tuplemr.mapred.lib.input
Class FixedWidthCSVTokenizer

java.lang.Object
  extended by com.datasalt.pangool.tuplemr.mapred.lib.input.FixedWidthCSVTokenizer
All Implemented Interfaces:
com.googlecode.jcsv.reader.CSVTokenizer

public class FixedWidthCSVTokenizer
extends Object
implements com.googlecode.jcsv.reader.CSVTokenizer

A custom CSVTokenizer for input lines with fixed width fields.

If a null string is provided then it is null when found in a field.

The null string provided can be null which means there will be no null string at all.


Constructor Summary
FixedWidthCSVTokenizer(int[] fields, String nullString)
          Fixed width tokeninzer fields: must contains pairs of positions, indicating the location of fields in the line.
 
Method Summary
 List<String> tokenizeLine(String line, com.googlecode.jcsv.CSVStrategy strategy, BufferedReader reader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedWidthCSVTokenizer

public FixedWidthCSVTokenizer(int[] fields,
                              String nullString)
Fixed width tokeninzer

Method Detail

tokenizeLine

public List<String> tokenizeLine(String line,
                                 com.googlecode.jcsv.CSVStrategy strategy,
                                 BufferedReader reader)
                          throws IOException
Specified by:
tokenizeLine in interface com.googlecode.jcsv.reader.CSVTokenizer
Throws:
IOException


Copyright © –2014 Datasalt Systems S.L.. All rights reserved.