List of utility methods to do Reader Read Line
int | readLines(BufferedReader in, StringBuilder buffer, int numLines, String lineEnd) Read the contents of the Reader into the provided StringBuilder. int lines = 0; String line = in.readLine(); while (line != null) { buffer.append(line); buffer.append(lineEnd); lines++; if (lines >= numLines) break; ... |
String | readLines(BufferedReader reader) read Lines StringBuffer lines = new StringBuffer(); String line = null; while ((line = reader.readLine()) != null) { lines.append(line); lines.append("\n"); return lines.toString(); |
List | readLines(final BufferedReader aReader) read Lines final ArrayList<String> lines = new ArrayList<String>(); while (true) { final String line = aReader.readLine(); if (line == null) break; lines.add(line); return lines; ... |
ArrayList | readLines(final Reader input) Get the contents of a Reader as a list of Strings, one entry per line. final BufferedReader reader = new BufferedReader(input); final ArrayList<String> result = new ArrayList<String>(); String line = reader.readLine(); while (line != null) { result.add(line); line = reader.readLine(); return result; ... |
List | readLines(Reader in) read Lines List<String> answer = new ArrayList<String>(); LineNumberReader reader = new LineNumberReader(in); String line = reader.readLine(); while (line != null) { answer.add(line); line = reader.readLine(); return answer; ... |
String[] | readLines(Reader in, boolean trim) Reads all data from the reader and returns it as an array of lines. ArrayList<String> list = new ArrayList<>(); readLines(in, trim, list); return list.toArray(new String[list.size()]); |
List | readLines(Reader input) Get the contents of a Reader as a list of Strings, one entry per line.
BufferedReader reader = new BufferedReader(input); List list = new ArrayList(); String line = reader.readLine(); while (line != null) { list.add(line); line = reader.readLine(); return list; ... |
List | readLines(Reader input) read Lines BufferedReader reader = new BufferedReader(input); List list = new ArrayList(); String line = reader.readLine(); while (line != null) { list.add(line); line = reader.readLine(); return list; ... |
List | readLines(Reader input) read Lines BufferedReader reader = new BufferedReader(input); List<String> list = new ArrayList<String>(); String line = reader.readLine(); while (line != null) { list.add(line); line = reader.readLine(); return list; ... |
List | readLines(Reader input) Get the contents of a Reader as a list of Strings, one entry per line.
BufferedReader reader = new BufferedReader(input); List list = new ArrayList(); String line = reader.readLine(); while (line != null) { list.add(line); line = reader.readLine(); return list; ... |