Here you can find the source of readLine(BufferedReader reader)
Parameter | Description |
---|---|
reader | Reader |
Parameter | Description |
---|---|
IOException | an exception |
private static String readLine(BufferedReader reader) throws IOException
//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; } }