The charset can be null and will default to UTF-8.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578191 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2014-03-17 00:50:55 +00:00
parent 7b8cc87fd8
commit c473d87f23

View File

@ -183,7 +183,7 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
* @param url
* a URL. Must not be null.
* @param charset
* the charset for the resource. Must not be null.
* the charset for the resource. If {@code null}, use {@code UTF-8}.
* @param format
* the CSVFormat used for CSV parsing. Must not be null.
* @return a new parser
@ -194,7 +194,6 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
*/
public static CSVParser parse(final URL url, final Charset charset, final CSVFormat format) throws IOException {
Assertions.notNull(url, "url");
Assertions.notNull(charset, "charset");
Assertions.notNull(format, "format");
return new CSVParser(new InputStreamReader(url.openStream(),