JAVA-27645 Check article code matches github (#15323)
This commit is contained in:
@@ -14,52 +14,52 @@ import java.util.List;
|
||||
public class Application {
|
||||
|
||||
// CSV Reader Examples
|
||||
public static List<String[]> readLineByLineSyncExample() throws Exception {
|
||||
public static List<String[]> readLineByLineExample() throws Exception {
|
||||
Path path = Helpers.twoColumnCsvPath();
|
||||
return CsvReaderExamples.readLineByLine(path);
|
||||
}
|
||||
|
||||
public static List<String[]> readAllLinesSyncExample() throws Exception {
|
||||
public static List<String[]> readAllLinesExample() throws Exception {
|
||||
Path path = Helpers.twoColumnCsvPath();
|
||||
return CsvReaderExamples.readAllLines(path);
|
||||
}
|
||||
|
||||
// CSV Writer Examples
|
||||
public static String writeLineByLineSyncExample() throws Exception {
|
||||
public static String writeLineByLineExample() throws Exception {
|
||||
Path path = Helpers.fileOutOnePath();
|
||||
return CsvWriterExamples.writeLineByLine(Helpers.fourColumnCsvString(), path);
|
||||
}
|
||||
|
||||
public static String writeAllLinesSyncExample() throws Exception {
|
||||
public static String writeAllLinesExample() throws Exception {
|
||||
Path path = Helpers.fileOutAllPath();
|
||||
return CsvWriterExamples.writeAllLines(Helpers.fourColumnCsvString(), path);
|
||||
}
|
||||
|
||||
// Bean Examples
|
||||
public static List<CsvBean> simpleSyncPositionBeanExample() throws Exception {
|
||||
public static List<CsvBean> simplePositionBeanExample() throws Exception {
|
||||
Path path = Helpers.twoColumnCsvPath();
|
||||
return BeanExamples.beanBuilderExample(path, SimplePositionBean.class);
|
||||
}
|
||||
|
||||
public static List<CsvBean> namedSyncColumnBeanExample() throws Exception {
|
||||
public static List<CsvBean> namedColumnBeanExample() throws Exception {
|
||||
Path path = Helpers.namedColumnCsvPath();
|
||||
return BeanExamples.beanBuilderExample(path, NamedColumnBean.class);
|
||||
}
|
||||
|
||||
public static String writeSyncCsvFromBeanExample() throws Exception {
|
||||
public static String writeCsvFromBeanExample() throws Exception {
|
||||
Path path = Helpers.fileOutBeanPath();
|
||||
return BeanExamples.writeCsvFromBean(path);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
simpleSyncPositionBeanExample();
|
||||
namedSyncColumnBeanExample();
|
||||
writeSyncCsvFromBeanExample();
|
||||
readLineByLineSyncExample();
|
||||
readAllLinesSyncExample();
|
||||
writeLineByLineSyncExample();
|
||||
writeAllLinesSyncExample();
|
||||
simplePositionBeanExample();
|
||||
namedColumnBeanExample();
|
||||
writeCsvFromBeanExample();
|
||||
readLineByLineExample();
|
||||
readAllLinesExample();
|
||||
writeLineByLineExample();
|
||||
writeAllLinesExample();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Error during csv processing", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user