Here you can find the source of getRightFirstRow(List
private static Integer getRightFirstRow(List<String[]> csvRows)
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import java.util.List; public class Main { private static Integer getRightFirstRow(List<String[]> csvRows) { Integer numbersOfColumns = null; int parserLine = csvRows.size(); if (parserLine > 50) { parserLine = 50;/* ww w . j a va 2 s. c o m*/ } for (int i = 0; i < parserLine; i++) { if (csvRows.get(i) != null) { String[] nbRow = csvRows.get(i); // List<XmlField> nbRowFields = nbRow.getFields(); if (numbersOfColumns == null || nbRow.length >= numbersOfColumns) { numbersOfColumns = nbRow.length; } } } return numbersOfColumns; } }