Here you can find the source of load(File pFile)
public static String load(File pFile)
//package com.java2s; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.util.Vector; public class Main { public static Vector Exception = new Vector(); public static String load(File pFile) { if (pFile == null || !pFile.canRead()) return null; FileReader in = null;/*from w w w . jav a 2 s .c om*/ BufferedReader buf = null; StringBuffer lString = new StringBuffer(); try { in = new FileReader(pFile); buf = new BufferedReader(in); String line; while ((line = buf.readLine()) != null) { lString.append(line); } } catch (Exception e) { return null; } finally { try { if (buf != null) buf.close(); if (in != null) in.close(); } catch (Exception e) { return null; } } return lString.toString(); } }