Java BufferedReader Read Line readLine(BufferedReader reader)

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

Description

Read a line from the reader

License

Open Source License

Parameter

Parameter Description
reader Reader

Exception

Parameter Description
IOException an exception

Return

line from the reader

Declaration

private static String readLine(BufferedReader reader) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.BufferedReader;

import java.io.IOException;

public class Main {
    /**//from  w w w .j  a  v  a  2  s. com
     * Read a line from the reader
     * 
     * @param reader
     *            Reader
     * @return line from the reader
     * @throws IOException
     */
    private static String readLine(BufferedReader reader) throws IOException {
        String line = reader.readLine();
        if (line != null) {
            return line.trim();
        }
        return null;
    }
}

Related

  1. readLine(BufferedReader in)
  2. readLine(BufferedReader in)
  3. readline(BufferedReader in, BufferedReader err)
  4. readLine(BufferedReader input)
  5. readLine(BufferedReader reader)
  6. readLine(BufferedReader reader)
  7. readLine(BufferedReader reader, StringWriter writer)
  8. readLine(File f)
  9. readLine(File f)