Java BufferedReader Read Line readLine(BufferedReader input)

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

Description

read Line

License

Open Source License

Parameter

Parameter Description
input Input stream from a Perforce command

Return

Single line of text obtained from the input stream

Declaration

protected static String readLine(BufferedReader input) throws IOException 

Method Source Code


//package com.java2s;
/*/*from   w w  w .  j a  v  a 2 s .  c om*/
 * Copyright 2000-2003 by Model N, Inc.  All Rights Reserved.
 * 
 * This software is the confidential and proprietary information
 * of Model N, Inc ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only
 * in accordance with the terms of the license agreement you
 * entered into with Model N, Inc.
 */

import java.io.BufferedReader;

import java.io.IOException;

public class Main {
    /**
     * 
     * @param   input    Input stream from a Perforce command
     * @return  Single line of text obtained from the input stream
     */
    protected static String readLine(BufferedReader input) throws IOException {
        String line = input.readLine();
        //logger.debug("READING: " + line);
        /**
            // Read any characters that were not terminated by a newline
            int nextChar = p4in.read();
            boolean charsFound = (nextChar != -1);
            while (nextChar != -1) {
        str.append(nextChar);
        nextChar = p4in.read();
            }
            if (charsFound) {
        str.append("\n");
            }
        */
        return line;
    }
}

Related

  1. readLine(BufferedReader br)
  2. readLine(BufferedReader br, int maxlen)
  3. readLine(BufferedReader in)
  4. readLine(BufferedReader in)
  5. readline(BufferedReader in, BufferedReader err)
  6. readLine(BufferedReader reader)
  7. readLine(BufferedReader reader)
  8. readLine(BufferedReader reader)
  9. readLine(BufferedReader reader, StringWriter writer)