File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9292 *
9393 * <h4>Parsing completely into memory</h4>
9494 * <p>
95- * You may also get a List of records:
95+ * If parsing record wise is not desired, the contents of the input can be read completely into memory.
9696 * </p>
9797 *
9898 * <pre>
9999 * Reader in = new StringReader("a;b\nc;d");
100100 * CSVParser parser = new CSVParser(in, CSVFormat.EXCEL);
101101 * List<CSVRecord> list = parser.getRecords();
102102 * </pre>
103+ *
104+ * <p>
105+ * There are two constraints that have to be kept in mind:
106+ * </p>
107+ *
108+ * <p>
109+ * <ol>
110+ * <li>Parsing into memory starts at the current position of the parser. If you have already parsed records from
111+ * the input, those records will not end up in the in memory representation of your CSV data.</li>
112+ * <li>Parsing into memory may consume a lot of system resources depending on the input. For example if you're
113+ * parsing a 150MB file of CSV data the contents will be read completely into memory.</li>
114+ * </ol>
115+ * </p>
116+ *
103117 * <p>
104118 * Internal parser state is completely covered by the format and the reader-state.
105119 * </p>
You can’t perform that action at this time.
0 commit comments