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

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)
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;
...
voidreadLines(Reader r, List lines)
Utility to read a "file" into a List of strings, appending one per line of the file to the end of the given List.
BufferedReader lineReader = (r instanceof BufferedReader) ? (BufferedReader) r : new BufferedReader(r);
String line;
while ((line = lineReader.readLine()) != null) {
    lines.add(line);
ListreadLines(Reader reader)
read Lines
return readLines(new BufferedReader(reader, BUFFER_SIZE), -1);
String[]readLines(Reader reader)
Reads a reader putting all its lines in an array.
return readLines(reader, 0, 0);
ListreadLines(Reader reader)
read Lines
BufferedReader bufferedReader = new BufferedReader(reader);
try {
    List<String> lines = new ArrayList<String>();
    String line = null;
    while ((line = bufferedReader.readLine()) != null) {
        lines.add(line);
    return lines;
...
String[]readLines(Reader reader)
read Lines
final ArrayList<String> lines = new ArrayList<String>();
LineNumberReader lnr = new LineNumberReader(reader);
try {
    String line;
    while ((line = lnr.readLine()) != null) {
        lines.add(line);
} finally {
...
StringreadLines(Reader reader)
read Lines
BufferedReader buf = new BufferedReader(reader);
StringBuilder string = new StringBuilder();
String line = buf.readLine();
while (line != null) {
    string.append(line);
    line = buf.readLine();
    if (line != null) {
        string.append("\n");
...
ListreadLinesFromReader(final Reader reader)
Reads lines of text from the specified Reader .
final BufferedReader br = new BufferedReader(reader);
try {
    final List<String> lines = new ArrayList<String>();
    String line;
    while (true) {
        line = br.readLine();
        if (line == null) {
            return lines;
...
ListreadLinesToList(BufferedReader bufferedReader)
read Lines To List
if (bufferedReader == null) {
    return null;
} else {
    List<String> list = new ArrayList<String>();
    String line = null;
    while ((line = bufferedReader.readLine()) != null) {
        list.add(line);
    return list;