Java Reader Read Line readLines(BufferedReader reader)

Here you can find the source of readLines(BufferedReader reader)

Description

read Lines

License

Open Source License

Declaration

public static String readLines(BufferedReader reader)
            throws IOException 

Method Source Code

//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();
    }
}

Related

  1. readLines(BufferedReader in, StringBuilder buffer, int numLines, String lineEnd)
  2. readLines(final BufferedReader aReader)
  3. readLines(final Reader input)
  4. readLines(Reader in)
  5. readLines(Reader in, boolean trim)