@Test public void pipes() { String withEmpty = "|a|b|c|".trim(); assertThat(CSVTSVUtil.splitPipes(withEmpty).length, is(5)); assertThat(withEmpty.split("\\|").length, is(4)); String withEmptyNoTrim = "|a|b|c|"; assertThat(CSVTSVUtil.splitPipes(withEmptyNoTrim).length, is(5)); assertThat(withEmptyNoTrim.split("\\|").length, is(4)); }
public static String[] splitPipes(String aline) { return StringUtils.splitByWholeSeparatorPreserveAllTokens(aline, CharsetConstant.SEPARATOR_CHAR); }
CSVTSVUtil { public static String[] splitPipes(String aline) { return StringUtils.splitByWholeSeparatorPreserveAllTokens(aline, CharsetConstant.SEPARATOR_CHAR); } }
CSVTSVUtil { public static String[] splitPipes(String aline) { return StringUtils.splitByWholeSeparatorPreserveAllTokens(aline, CharsetConstant.SEPARATOR_CHAR); }  }
CSVTSVUtil { public static String[] splitPipes(String aline) { return StringUtils.splitByWholeSeparatorPreserveAllTokens(aline, CharsetConstant.SEPARATOR_CHAR); }  static LabeledCSVParser createLabeledCSVParser(InputStream inputStream); static LabeledCSVParser createLabeledCSVParser(Reader reader); static LabeledCSVParser createLabeledTSVParser(InputStream is); static LabeledCSVParser createLabeledCSVParser(CSVParse parser); static LabeledCSVParser createParser(File tmpFile, ZipInputStream zis); static void escapeQuotes(StringBuilder resultBuilder, JsonNode node); static String escapeCSV(String text); static void escapeTSV(StringBuilder resultBuilder, JsonNode node); static String escapeTSV(String text); static String valueOrNull(LabeledCSVParser labeledCSVParser, String columnName); static String valueOrDefault(LabeledCSVParser labeledCSVParser, String columnName, String defaultValue); static String valueOrNull(String[] line, int index); static String valueOrDefault(String[] line, int index, String defaultValue); static CSVParse createTSVParser(Reader reader); static CSVParse createCSVParser(InputStream inputStream); static CSVParse createCSVParse(InputStream inputStream, char delimiter); static CSVParse createExcelCSVParse(InputStream inputStream); static CSVParse createExcelCSVParse(Reader reader); static CSVPrint createExcelCSVPrint(Writer writer); static List<String> escapeValues(String[] values); static List<String> escapeValues(Collection<Object> values); static List<String> escapeValues(Stream<String> stream); static Stream<String> mapEscapedValues(Stream<String> stream); static String[] splitTSV(String aline); static String[] splitPipes(String aline); }
CSVTSVUtil { public static String[] splitPipes(String aline) { return StringUtils.splitByWholeSeparatorPreserveAllTokens(aline, CharsetConstant.SEPARATOR_CHAR); }  static LabeledCSVParser createLabeledCSVParser(InputStream inputStream); static LabeledCSVParser createLabeledCSVParser(Reader reader); static LabeledCSVParser createLabeledTSVParser(InputStream is); static LabeledCSVParser createLabeledCSVParser(CSVParse parser); static LabeledCSVParser createParser(File tmpFile, ZipInputStream zis); static void escapeQuotes(StringBuilder resultBuilder, JsonNode node); static String escapeCSV(String text); static void escapeTSV(StringBuilder resultBuilder, JsonNode node); static String escapeTSV(String text); static String valueOrNull(LabeledCSVParser labeledCSVParser, String columnName); static String valueOrDefault(LabeledCSVParser labeledCSVParser, String columnName, String defaultValue); static String valueOrNull(String[] line, int index); static String valueOrDefault(String[] line, int index, String defaultValue); static CSVParse createTSVParser(Reader reader); static CSVParse createCSVParser(InputStream inputStream); static CSVParse createCSVParse(InputStream inputStream, char delimiter); static CSVParse createExcelCSVParse(InputStream inputStream); static CSVParse createExcelCSVParse(Reader reader); static CSVPrint createExcelCSVPrint(Writer writer); static List<String> escapeValues(String[] values); static List<String> escapeValues(Collection<Object> values); static List<String> escapeValues(Stream<String> stream); static Stream<String> mapEscapedValues(Stream<String> stream); static String[] splitTSV(String aline); static String[] splitPipes(String aline);  }