@@ -44,20 +44,36 @@ public class JacksonCSVSplitter implements Splitter<JacksonHandle> {
4444 private long count = 0 ;
4545 private ArrayNode headers = null ;
4646
47+ /**
48+ * @return the CsvMapper for the current instance.
49+ */
4750 public CsvMapper getCsvMapper () {
4851 return csvMapper ;
4952 }
5053
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+ */
5159 public JacksonCSVSplitter withCsvSchema (CsvSchema schema ) {
5260 this .csvSchema = schema ;
5361 return this ;
5462 }
5563
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+ */
5669 public JacksonCSVSplitter withCsvMapper (CsvMapper mapper ) {
5770 this .csvMapper = mapper ;
5871 return this ;
5972 }
6073
74+ /**
75+ * @return the CsvSchema for the current instance.
76+ */
6177 public CsvSchema getCsvSchema () {
6278 return csvSchema ;
6379 }
@@ -77,7 +93,7 @@ private CsvMapper configureCsvMapper() {
7793 return csvMapper ;
7894 }
7995
80- /*
96+ /**
8197 * Takes the input stream and converts it into a stream of JacksonHandle by setting the schema
8298 * and wrapping the JsonNode into JacksonHandle.
8399 * @param input the input stream passed in.
@@ -92,7 +108,7 @@ public Stream<JacksonHandle> split(InputStream input) throws Exception {
92108 return configureInput (configureObjReader ().readValues (input ));
93109 }
94110
95- /*
111+ /**
96112 * Takes the input stream and converts it into a stream of JacksonHandle by setting the schema
97113 * and wrapping the JsonNode into JacksonHandle.
98114 * @param input the Reader stream passed in.
@@ -106,10 +122,17 @@ public Stream<JacksonHandle> split(Reader input) throws Exception {
106122 return configureInput (configureObjReader ().readValues (input ));
107123 }
108124
125+ /**
126+ * @return the number of JsonNodes found in the input stream.
127+ */
109128 @ Override
110129 public long getCount () {
111130 return this .count ;
112131 }
132+
133+ /**
134+ * @return the headers found in the csv file.
135+ */
113136 public ArrayNode getHeaders () {
114137 return this .headers ;
115138 }
0 commit comments