JAVA-2105: Move articles out of core-java-io module

This commit is contained in:
Krzysiek 2020-07-13 21:17:54 +02:00
parent 205c49b3e4
commit 845a8968c7
8 changed files with 18 additions and 28 deletions

View File

@ -6,4 +6,6 @@ This module contains articles about core Java input/output(IO) conversions.
- [Java InputStream to String](https://www.baeldung.com/convert-input-stream-to-string)
- [Java Write an InputStream to a File](https://www.baeldung.com/convert-input-stream-to-a-file)
- [Converting a BufferedReader to a JSONObject](https://www.baeldung.com/java-bufferedreader-to-jsonobject)
- [Reading a CSV File into an Array](https://www.baeldung.com/java-csv-file-array)
- [How to Write to a CSV File in Java](https://www.baeldung.com/java-csv)
- More articles: [[<-- prev]](/core-java-modules/core-java-io-conversions)

View File

@ -26,6 +26,12 @@
<artifactId>json</artifactId>
<version>${json.version}</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>${opencsv.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
@ -40,6 +46,7 @@
<properties>
<json.version>20200518</json.version>
<opencsv.version>4.1</opencsv.version>
</properties>
</project>

View File

@ -1,20 +1,11 @@
package com.baeldung.csv;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
import com.opencsv.CSVReader;
import org.junit.Assert;
import org.junit.Test;
import com.opencsv.CSVReader;
import java.io.*;
import java.util.*;
public class ReadCSVInArrayUnitTest {
public static final String COMMA_DELIMITER = ",";

View File

@ -1,7 +1,9 @@
package com.baeldung.csv;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileNotFoundException;
@ -10,10 +12,8 @@ import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class WriteCsvFileExampleUnitTest {
private static final Logger LOG = LoggerFactory.getLogger(WriteCsvFileExampleUnitTest.class);

View File

@ -8,10 +8,8 @@ This module contains articles about core Java input and output (IO)
- [Java Directory Size](https://www.baeldung.com/java-folder-size)
- [File Size in Java](https://www.baeldung.com/java-file-size)
- [Zipping and Unzipping in Java](https://www.baeldung.com/java-compress-and-uncompress)
- [Reading a CSV File into an Array](https://www.baeldung.com/java-csv-file-array)
- [How to Get the File Extension of a File in Java](https://www.baeldung.com/java-file-extension)
- [Getting a Files Mime Type in Java](https://www.baeldung.com/java-file-mime-type)
- [How to Write to a CSV File in Java](https://www.baeldung.com/java-csv)
- [How to Avoid the Java FileNotFoundException When Loading Resources](https://www.baeldung.com/java-classpath-resource-cannot-be-opened)
- [Create a Directory in Java](https://www.baeldung.com/java-create-directory)
- [[More -->]](/core-java-modules/core-java-io-2)

View File

@ -29,12 +29,6 @@
<version>${hsqldb.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>${opencsv.version}</version>
<scope>test</scope>
</dependency>
<!-- Mime Type Resolution Libraries -->
<dependency>
<groupId>org.apache.tika</groupId>
@ -142,8 +136,6 @@
</profiles>
<properties>
<!-- util -->
<opencsv.version>4.1</opencsv.version>
<!-- testing -->
<assertj.version>3.6.1</assertj.version>
<!-- maven plugins -->