From 831047e3dacf588a197dc91efc72d0a47736f32f Mon Sep 17 00:00:00 2001 From: Oliver Siegmar Date: Fri, 18 Aug 2023 15:28:09 +0200 Subject: [PATCH] doc cleanups --- .../de/siegmar/fastcsv/reader/CsvReader.java | 24 +++++++++---------- .../fastcsv/reader/NamedCsvReader.java | 24 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/main/java/de/siegmar/fastcsv/reader/CsvReader.java b/src/main/java/de/siegmar/fastcsv/reader/CsvReader.java index d9f261d7..837ba949 100644 --- a/src/main/java/de/siegmar/fastcsv/reader/CsvReader.java +++ b/src/main/java/de/siegmar/fastcsv/reader/CsvReader.java @@ -23,8 +23,8 @@ *

* Example use: *

{@code
- * try (CsvReader csvReader = CsvReader.builder().build(path)) {
- *     for (CsvRow row : csvReader) {
+ * try (CsvReader csv = CsvReader.builder().build(file)) {
+ *     for (CsvRow row : csv) {
  *         ...
  *     }
  * }
@@ -350,31 +350,31 @@ public CsvReader build(final String data) {
         }
 
         /**
-         * Constructs a new {@link CsvReader} for the specified path using UTF-8 as the character set.
+         * Constructs a new {@link CsvReader} for the specified file using UTF-8 as the character set.
          *
-         * @param path    the file to read data from.
+         * @param file    the file to read data from.
          * @return a new CsvReader - never {@code null}. Don't forget to close it!
          * @throws IOException if an I/O error occurs.
-         * @throws NullPointerException if path or charset is {@code null}
+         * @throws NullPointerException if file or charset is {@code null}
          */
-        public CsvReader build(final Path path) throws IOException {
-            return build(path, StandardCharsets.UTF_8);
+        public CsvReader build(final Path file) throws IOException {
+            return build(file, StandardCharsets.UTF_8);
         }
 
         /**
          * Constructs a new {@link CsvReader} for the specified arguments.
          *
-         * @param path    the file to read data from.
+         * @param file    the file to read data from.
          * @param charset the character set to use.
          * @return a new CsvReader - never {@code null}. Don't forget to close it!
          * @throws IOException if an I/O error occurs.
-         * @throws NullPointerException if path or charset is {@code null}
+         * @throws NullPointerException if file or charset is {@code null}
          */
-        public CsvReader build(final Path path, final Charset charset) throws IOException {
-            Objects.requireNonNull(path, "path must not be null");
+        public CsvReader build(final Path file, final Charset charset) throws IOException {
+            Objects.requireNonNull(file, "file must not be null");
             Objects.requireNonNull(charset, "charset must not be null");
 
-            return newReader(new InputStreamReader(Files.newInputStream(path), charset));
+            return newReader(new InputStreamReader(Files.newInputStream(file), charset));
         }
 
         private CsvReader newReader(final Reader reader) {
diff --git a/src/main/java/de/siegmar/fastcsv/reader/NamedCsvReader.java b/src/main/java/de/siegmar/fastcsv/reader/NamedCsvReader.java
index 27075818..0acac97e 100644
--- a/src/main/java/de/siegmar/fastcsv/reader/NamedCsvReader.java
+++ b/src/main/java/de/siegmar/fastcsv/reader/NamedCsvReader.java
@@ -16,12 +16,12 @@
 import java.util.stream.StreamSupport;
 
 /**
- * Header name based Csv reader implementation.
+ * Header name based CSV reader implementation.
  * 

* Example use: *

{@code
- * try (NamedCsvReader csvReader = NamedCsvReader.builder().build(path)) {
- *     for (NamedCsvRow row : csvReader) {
+ * try (NamedCsvReader csv = NamedCsvReader.builder().build(file)) {
+ *     for (NamedCsvRow row : csv) {
  *         ...
  *     }
  * }
@@ -215,28 +215,28 @@ public NamedCsvReaderBuilder skipComments(final boolean skipComments) {
         }
 
         /**
-         * Constructs a new {@link NamedCsvReader} for the specified path using UTF-8 as the character set.
+         * Constructs a new {@link NamedCsvReader} for the specified file using UTF-8 as the character set.
          *
-         * @param path    the file to read data from.
+         * @param file    the file to read data from.
          * @return a new NamedCsvReader - never {@code null}. Don't forget to close it!
          * @throws IOException if an I/O error occurs.
-         * @throws NullPointerException if path or charset is {@code null}
+         * @throws NullPointerException if file or charset is {@code null}
          */
-        public NamedCsvReader build(final Path path) throws IOException {
-            return build(path, StandardCharsets.UTF_8);
+        public NamedCsvReader build(final Path file) throws IOException {
+            return build(file, StandardCharsets.UTF_8);
         }
 
         /**
          * Constructs a new {@link NamedCsvReader} for the specified arguments.
          *
-         * @param path    the file to read data from.
+         * @param file    the file to read data from.
          * @param charset the character set to use.
          * @return a new NamedCsvReader - never {@code null}. Don't forget to close it!
          * @throws IOException if an I/O error occurs.
-         * @throws NullPointerException if path or charset is {@code null}
+         * @throws NullPointerException if file or charset is {@code null}
          */
-        public NamedCsvReader build(final Path path, final Charset charset) throws IOException {
-            return new NamedCsvReader(csvReaderBuilder().build(path, charset));
+        public NamedCsvReader build(final Path file, final Charset charset) throws IOException {
+            return new NamedCsvReader(csvReaderBuilder().build(file, charset));
         }
 
         /**