Java BufferedReader Create getBufferedReader(Reader rd)

Here you can find the source of getBufferedReader(Reader rd)

Description

Get BufferedReader.

License

Apache License

Declaration

public static BufferedReader getBufferedReader(Reader rd) 

Method Source Code

//package com.java2s;
/*//  w w  w .ja  va  2  s.co m
 * Copyright (C) The Apache Software Foundation. All rights reserved.
 *
 * This software is published under the terms of the Apache Software License
 * version 1.1, a copy of which has been included with this distribution in
 * the LICENSE file.
 */

import java.io.BufferedReader;

import java.io.Reader;

public class Main {
    /**
     * Get <code>BufferedReader</code>.
     */
    public static BufferedReader getBufferedReader(Reader rd) {
        BufferedReader br = null;
        if (br instanceof java.io.BufferedReader) {
            br = (BufferedReader) rd;
        } else {
            br = new BufferedReader(rd);
        }
        return br;
    }
}

Related

  1. getBufferedReader(final InputStream inputstream)
  2. getBufferedReader(InputStream inputStream)
  3. getBufferedReader(InputStream inputStream, String charsetName)
  4. getBufferedReader(InputStream stream, String charset)
  5. getBufferedReader(Reader r)
  6. getBufferedReader(String directory, String filename)
  7. getBufferedReader(String file)
  8. getBufferedReader(String filename)
  9. getBufferedReader(String filename, String encoding)