Java Utililty Methods Reader Read Line

List of utility methods to do Reader Read Line

Description

The list of methods to do Reader Read Line are organized into topic(s).

Method

intreadLines(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;
...
StringreadLines(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();
ListreadLines(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;
...
ArrayListreadLines(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;
...
ListreadLines(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()]);
ListreadLines(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;
...
ListreadLines(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;
...
ListreadLines(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;
...
ListreadLines(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;
...