@@ -91,23 +91,19 @@ public final class CSVPrinter implements Flushable, Closeable {
9191 /**
9292 * Creates a printer that will print values to the given stream following the CSVFormat.
9393 * <p>
94- * Currently, only a pure encapsulation format or a pure escaping format is supported. Hybrid formats (encapsulation
95- * and escaping with a different character) are not supported.
94+ * Currently, only a pure encapsulation format or a pure escaping format is supported. Hybrid formats (encapsulation and escaping with a different
95+ * character) are not supported.
9696 * </p>
9797 *
98- * @param appendable
99- * stream to which to print. Must not be null.
100- * @param format
101- * the CSV format. Must not be null.
102- * @throws IOException
103- * thrown if the optional header cannot be printed.
104- * @throws IllegalArgumentException
105- * thrown if the parameters of the format are inconsistent or if either out or format are null.
98+ * @param appendable stream to which to print. Must not be null.
99+ * @param format the CSV format. Must not be null.
100+ * @throws IOException thrown if the optional header cannot be printed.
101+ * @throws IllegalArgumentException thrown if the parameters of the format are inconsistent.
102+ * @throws NullPointerException thrown if either parameters are null.
106103 */
107104 public CSVPrinter (final Appendable appendable , final CSVFormat format ) throws IOException {
108105 Objects .requireNonNull (appendable , "appendable" );
109106 Objects .requireNonNull (format , "format" );
110-
111107 this .appendable = appendable ;
112108 this .format = format .copy ();
113109 // TODO: Is it a good idea to do this here instead of on the first call to a print method?
@@ -130,10 +126,12 @@ public void close() throws IOException {
130126
131127 /**
132128 * Closes the underlying stream with an optional flush first.
129+ *
133130 * @param flush whether to flush before the actual close.
134131 * @throws IOException
135132 * If an I/O error occurs
136133 * @since 1.6
134+ * @see CSVFormat#getAutoFlush()
137135 */
138136 public void close (final boolean flush ) throws IOException {
139137 if (flush || format .getAutoFlush ()) {
@@ -145,7 +143,7 @@ public void close(final boolean flush) throws IOException {
145143 }
146144
147145 /**
148- * Outputs the record separator and increments the record count.
146+ * Prints the record separator and increments the record count.
149147 *
150148 * @throws IOException
151149 * If an I/O error occurs
@@ -174,7 +172,7 @@ public void flush() throws IOException {
174172 * @return the target Appendable.
175173 */
176174 public Appendable getOut () {
177- return this . appendable ;
175+ return appendable ;
178176 }
179177
180178 /**
@@ -267,7 +265,7 @@ public synchronized void printHeaders(final ResultSet resultSet) throws IOExcept
267265 }
268266
269267 /**
270- * Outputs the record separator.
268+ * Prints the record separator.
271269 *
272270 * @throws IOException
273271 * If an I/O error occurs
0 commit comments