 <pre><code>try { File f=new File("test.html"); BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(f))); String content=null; while((content=reader.readLine())!=null) { System.out.println(content); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } </code></pre>