Check out example codes for "encode file to utf-8 in java". It will help you in understanding the concepts better.

Code Example 1

String charset = "ISO-8859-1"; // or what corresponds
  BufferedReader in = new BufferedReader( 
      new InputStreamReader (new FileInputStream(file), charset));
  String line;
  while( (line = in.readLine()) != null) { 
    ....
  }

Learn ReactJs, React Native from akashmittal.com