Try using InputStreamReader
instead of FileReader
.
This is possible because the constructor of CsvBeanReader
accepts the abstract class Reader
:
CsvBeanReader(Reader reader, CsvPreference preferences)
//Constructs a new CsvBeanReader with the supplied Reader and CSV preferences.
You can construct the InputStreamReader
using the InputStream
you have obtained:
InputStreamReader(InputStream in)
InputStreamReader(InputStream in, Charset cs)
InputStreamReader(InputStream in, CharsetDecoder dec)
InputStreamReader(InputStream in, String charsetName)