Skip to content

Commit e6759b8

Browse files
committed
Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508635 13f79535-47bb-0310-9956-ffa450edef68
1 parent f881372 commit e6759b8

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

src/main/java/org/apache/commons/csv/CSVParser.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,21 @@
9292
*/
9393
public class CSVParser implements Iterable<CSVRecord>, Closeable {
9494

95+
/**
96+
* Creates a parser for the given {@link File}.
97+
*
98+
* @param file
99+
* a CSV file
100+
* @param format
101+
* the CSVFormat used for CSV parsing
102+
* @return a new parser
103+
* @throws IOException
104+
* If an I/O error occurs
105+
*/
106+
public static CSVParser parseFile(File file, final CSVFormat format) throws IOException {
107+
return new CSVParser(new FileReader(file), format);
108+
}
109+
95110
/**
96111
* Creates a parser for the given resource.
97112
*
@@ -128,7 +143,7 @@ public static CSVParser parseResource(String resource, Charset charset, ClassLoa
128143
public static CSVParser parseString(String string) throws IOException {
129144
return parseString(string, CSVFormat.DEFAULT);
130145
}
131-
146+
132147
/**
133148
* Creates a parser for the given {@link String}.
134149
*
@@ -144,21 +159,6 @@ public static CSVParser parseString(String string, final CSVFormat format) throw
144159
return new CSVParser(new StringReader(string), format);
145160
}
146161

147-
/**
148-
* Creates a parser for the given {@link File}.
149-
*
150-
* @param file
151-
* a CSV file
152-
* @param format
153-
* the CSVFormat used for CSV parsing
154-
* @return a new parser
155-
* @throws IOException
156-
* If an I/O error occurs
157-
*/
158-
public static CSVParser parseFile(File file, final CSVFormat format) throws IOException {
159-
return new CSVParser(new FileReader(file), format);
160-
}
161-
162162
/**
163163
* Creates a parser for the given URL.
164164
*

0 commit comments

Comments
 (0)