Java CSV from getListFromCSV(String myCsv)

Here you can find the source of getListFromCSV(String myCsv)

Description

get List From CSV

License

Open Source License

Declaration

static public List<String> getListFromCSV(String myCsv) 

Method Source Code

//package com.java2s;

import java.util.ArrayList;
import java.util.List;

public class Main {
    static public List<String> getListFromCSV(String myCsv) {
        List<String> output = new ArrayList();
        if (null == myCsv)
            return output;
        String[] fields = myCsv.split(",");
        if (null == fields)
            return output;
        for (int i = 0; i < fields.length; i++) {
            output.add(fields[i]);/*from  w  ww.j a v  a2  s .  c  om*/
        }
        return output;
    }
}

Related

  1. getCSVString(List items)
  2. getCsvStringsFromList(final List stringsToDelimit)
  3. getepcList(String csv)
  4. getFixedArrayListSizeFromCSV(String csvString, int returnArrayListSize)
  5. getListFromCSV(String myCsv)
  6. getListFromCSVString(String csvString)
  7. getPrintableCSVs(List list)
  8. getRightFirstRow(List csvRows)
  9. getStringList(String csv)