Here you can find the source of readLines(String body)
public static List<String> readLines(String body)
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader; import java.util.ArrayList; import java.util.List; public class Main { public static List<String> readLines(String body) { final BufferedReader reader = new BufferedReader(new StringReader(body)); final List<String> lines = new ArrayList<String>(); try {/*from ww w .j a v a 2 s . c o m*/ for (String line = reader.readLine(); line != null; line = reader.readLine()) { line = line.trim(); if (line.length() > 1) { lines.add(line); } } } catch (IOException ignored) { } return lines; } }