May be I am doing it worng by using MultipartFile upload feature.
I have to read data from csv file which will be chosen by the client through the browser. I used Mu
I used a buffer to read line by line and get from multipart the inputstream. Maybe is more code, but I find helpful read text file by lines.
BufferedReader br;
List result = new ArrayList<>();
try {
String line;
InputStream is = multipart.getInputStream();
br = new BufferedReader(new InputStreamReader(is));
while ((line = br.readLine()) != null) {
result.add(line);
}
} catch (IOException e) {
System.err.println(e.getMessage());
}