Here you can find the source of readLines(BufferedReader reader)
public static String readLines(BufferedReader reader) throws IOException
//package com.java2s; import java.io.BufferedReader; import java.io.IOException; public class Main { public static String readLines(BufferedReader reader) throws IOException { StringBuffer lines = new StringBuffer(); String line = null;// w w w . j ava 2 s . c o m while ((line = reader.readLine()) != null) { lines.append(line); lines.append("\n"); } return lines.toString(); } }