Here you can find the source of load(String filename)
protected static String load(String filename)
//package com.java2s; /*// w ww . jav a 2 s.c o m * WAVE - Web Application Visual Environment * A Graphical Modeling Framework (GMF) Plugin for Eclipse * Copyright Jens Gulden, 2009, mail@jensgulden.de * Licensed under the GNU General Public License (GPL) */ import java.io.FileReader; import java.io.IOException; public class Main { protected static String load(String filename) { try { FileReader f = new FileReader(filename); char[] buf = new char[10 * 1024]; StringBuffer s = new StringBuffer(); int hasread = f.read(buf); while (hasread != -1) { s.append(buf, 0, hasread); hasread = f.read(buf); } f.close(); return s.toString(); } catch (IOException ioe) { return null; } } }