I've found a nice way in Java 8 with streams:
public static String readString(InputStream is) {
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String content = br.lines().reduce("", String::concat);
return content;
}
As stated above you can swap new InputStreamReader(is) with new InputStreamReader(is, "UTF-8"), but I have no experience with this constructor.