I am making use of javamail and I am having trouble getting the HTML from my gmail emails. I have the following:
Session session = Session.getDefaultInstance
You could use IOUtils of Apache Commons or can possibly even try something along the lines of :
BufferedReader br = new BufferedReader(new InputStreamReader(daInputStream)); String oneLine = ""; while ( (oneLine = br.readLine()) != null ) System.out.println(oneLine);