@@ -44,20 +44,36 @@ public class JacksonCSVSplitter implements Splitter<JacksonHandle> {
44
44
private long count = 0 ;
45
45
private ArrayNode headers = null ;
46
46
47
+ /**
48
+ * @return the CsvMapper for the current instance.
49
+ */
47
50
public CsvMapper getCsvMapper () {
48
51
return csvMapper ;
49
52
}
50
53
54
+ /**
55
+ * Used to set the CsvSchema for the current instance.
56
+ * @param schema is the CsvSchema passed in.
57
+ * @return an instance of JacksonCSVSplitter with CsvSchema set to the parameter.
58
+ */
51
59
public JacksonCSVSplitter withCsvSchema (CsvSchema schema ) {
52
60
this .csvSchema = schema ;
53
61
return this ;
54
62
}
55
63
64
+ /**
65
+ * Used to set the CsvMapper for the current instance.
66
+ * @param mapper is the CsvMapper passed in.
67
+ * @return an instance of JacksonCSVSplitter with CsvMapper set to the parameter.
68
+ */
56
69
public JacksonCSVSplitter withCsvMapper (CsvMapper mapper ) {
57
70
this .csvMapper = mapper ;
58
71
return this ;
59
72
}
60
73
74
+ /**
75
+ * @return the CsvSchema for the current instance.
76
+ */
61
77
public CsvSchema getCsvSchema () {
62
78
return csvSchema ;
63
79
}
@@ -77,7 +93,7 @@ private CsvMapper configureCsvMapper() {
77
93
return csvMapper ;
78
94
}
79
95
80
- /*
96
+ /**
81
97
* Takes the input stream and converts it into a stream of JacksonHandle by setting the schema
82
98
* and wrapping the JsonNode into JacksonHandle.
83
99
* @param input the input stream passed in.
@@ -92,7 +108,7 @@ public Stream<JacksonHandle> split(InputStream input) throws Exception {
92
108
return configureInput (configureObjReader ().readValues (input ));
93
109
}
94
110
95
- /*
111
+ /**
96
112
* Takes the input stream and converts it into a stream of JacksonHandle by setting the schema
97
113
* and wrapping the JsonNode into JacksonHandle.
98
114
* @param input the Reader stream passed in.
@@ -106,10 +122,17 @@ public Stream<JacksonHandle> split(Reader input) throws Exception {
106
122
return configureInput (configureObjReader ().readValues (input ));
107
123
}
108
124
125
+ /**
126
+ * @return the number of JsonNodes found in the input stream.
127
+ */
109
128
@ Override
110
129
public long getCount () {
111
130
return this .count ;
112
131
}
132
+
133
+ /**
134
+ * @return the headers found in the csv file.
135
+ */
113
136
public ArrayNode getHeaders () {
114
137
return this .headers ;
115
138
}
0 commit comments