@Test public void parseSomeMore() throws IOException { String csvString = "\"Obs\",\"spcode\", \"sizecl\", \"cruise\", \"stcode\", \"numstom\", \"numfood\", \"pctfull\", \"predator famcode\", \"prey\", \"number\", \"season\", \"depth\", \"transect\", \"alphcode\", \"taxord\", \"station\", \"long\", \"lat\", \"time\", \"sizeclass\", \"predator\"\n"; csvString += "1, 1, 16, 3, 2, 6, 6, 205.5, 1, \"Ampelisca sp. (abdita complex)\", 1, \"Summer\", 60, \"Chandeleur Islands\", \"aabd\", 47.11, \"C2\", 348078.84, 3257617.25, 313, \"201-300\", \"Rhynchoconger flavus\"\n"; csvString += "2, 11, 2, 1, 1, 20, 15, 592.5, 6, \"Ampelisca sp. (abdita complex)\", 1, \"Summer\", 20, \"Chandeleur Islands\", \"aabd\", 47.11, \"C1\", 344445.31, 3323087.25, 144, \"26-50\", \"Halieutichthys aculeatus\"\n"; LabeledCSVParser parser = CSVTSVUtil.createLabeledCSVParser(new StringReader(csvString)); parser.getLine(); assertThat(parser.getValueByLabel("prey"), is("Ampelisca sp. (abdita complex)")); }
public static LabeledCSVParser createLabeledCSVParser(InputStream inputStream) throws IOException { return new LabeledCSVParser(new AutoCloseCSVParser(inputStream)); }
CSVTSVUtil { public static LabeledCSVParser createLabeledCSVParser(InputStream inputStream) throws IOException { return new LabeledCSVParser(new AutoCloseCSVParser(inputStream)); } }
CSVTSVUtil { public static LabeledCSVParser createLabeledCSVParser(InputStream inputStream) throws IOException { return new LabeledCSVParser(new AutoCloseCSVParser(inputStream)); }  }
CSVTSVUtil { public static LabeledCSVParser createLabeledCSVParser(InputStream inputStream) throws IOException { return new LabeledCSVParser(new AutoCloseCSVParser(inputStream)); }  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 LabeledCSVParser createLabeledCSVParser(InputStream inputStream) throws IOException { return new LabeledCSVParser(new AutoCloseCSVParser(inputStream)); }  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);  }