Here you can find the source of getFileContent(String pythonSource)
public static String getFileContent(String pythonSource)
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; public class Main { public static String getFileContent(String pythonSource) { StringBuffer result = new StringBuffer(); try {// w ww .j ava 2 s . c o m FileReader reader = new FileReader(new File(pythonSource)); BufferedReader br = new BufferedReader(reader); String line = br.readLine(); while (line != null) { result.append("\n" + line); line = br.readLine(); } br.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return result.toString(); } }