title: StringBuilder encoding in Java
body: <p>I have a method which loads file from sdcard (Android) and then reads it with StringBuilder. The text which im reading is written with my native language characters such as ą ś ć ź ż... 
  StringBuilder (or FileInputStream) can't read them properly unfortunately. How I can set proper encoding ?</p>
  
  <p>here is the code : </p>
  
  <pre><code>File file = new File(filePath);
              FileInputStream fis = null;
              StringBuilder builder = new StringBuilder();
  
              try {
                  fis = new FileInputStream(file);
                  int content;
                  while ((content = fis.read()) != -1) {
                      builder.append((char) content);
                  }
  
              } catch (IOException e) {
                  e.printStackTrace();
              } finally {
                  try {
                      if (fis != null)
                          fis.close();
                  } catch (IOException ex) {
                      ex.printStackTrace();
                  }
              }
              System.out.println("File Contents = " + builder.toString());
              contactService.updateContacts(builder.toString());
  </code></pre>