List of utility methods to do CSV from
void | addAllFromCSV(List add All From CSV csv = csv.trim(); if (csv.isEmpty()) { return; String[] values = csv.split(","); for (String s : values) { list.add(s.trim()); |
String | convertListToCSVString(List convert List To CSV String StringBuilder csvString = new StringBuilder(); if (itemsList != null && !itemsList.isEmpty()) { for (Long item : itemsList) { if (csvString.length() > 0) { csvString.append(COMMA_SEPARATOR); csvString.append(item.toString()); } else { csvString.append(item.toString()); ... |
String | convertListToCSVString(List convert List To CSV String StringBuilder result = new StringBuilder(); String comma = ""; for (String element : list) { result.append(comma); result.append(element); comma = ","; return result.toString(); ... |
String | convertStringListToCSV(List Utility to convert List of Strings to CSV string. if (inputStringList == null || inputStringList.size() == 0) { return null; StringBuilder sb = new StringBuilder(); for (String inputString : inputStringList) { sb.append(inputString).append(','); sb.deleteCharAt(sb.length() - 1); ... |
String | convertStringListToCSV(List convert String List To CSV String finalString = ""; if (source != null && !source.isEmpty()) { for (String s : source) { if (s != null) { finalString = finalString.isEmpty() ? finalString + getValidCsvValue(s) : finalString + "," + getValidCsvValue(s); return finalString; |
int | countMaxColumnSizeByArray(List count Max Column Size By Array int max = 0; for (String[] csv : csvs) { if (csv.length > max) { max = csv.length; return max; |
List | csv2list(String csvString) Returns a list of String literals from a comma-separated value String. List<String> outList = new ArrayList<String>(); for (String element : csvString.split(COMMA)) { if (!element.isEmpty()) { outList.add(element); return outList; |
String[] | csvList(String _text, Integer[] _idx_ret) Kommaseparierte Werteliste in String[] umwandeln. List<String> list = new ArrayList<String>(); int idx = 0; boolean bCont = true; int idxr; do { idxr = _text.indexOf(',', idx); if (idxr == -1) { idxr = _text.length(); ... |
List | csvTagsToList(String tags) csv Tags To List List<String> tagsList = new ArrayList<String>(); if (tags != null) { String[] tokens = tags.split(","); for (int i = 0; i < tokens.length; i++) { tagsList.add(tokens[i].trim()); return tagsList; ... |
List | csvToList(String csv) converts a string with comma separated values to a List of Strings if (csv == null) { return new ArrayList<String>(); return Arrays.asList(csv.split(CSV_SEPARATOR.toString(), -1)); |