I\'m creating a simple wordcount program in Java that reads through a directory\'s text-based files.
However, I keep on getting the error:
java.nio.c
try this.. i had the same issue, below implementation worked for me
Reader reader = Files.newBufferedReader(Paths.get(), StandardCharsets.ISO_8859_1);
then use Reader where ever you want.
foreg:
CsvToBean csvToBean = null;
try {
Reader reader = Files.newBufferedReader(Paths.get(csvFilePath),
StandardCharsets.ISO_8859_1);
csvToBean = new CsvToBeanBuilder(reader)
.withType(anyPojo.class)
.withIgnoreLeadingWhiteSpace(true)
.withSkipLines(1)
.build();
} catch (IOException e) {
e.printStackTrace();
}