Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Amila
BufferedReader
1 Answer(s)      3 years and 7 months ago
Posted in : Java Beginners


What is BufferedReader used for?


Advertisement
View Answers

March 31, 2011 at 11:03 AM


BufferedReader read text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines. It can read data from the file and console.

Here is an example:

import  java.io.*;
class BufferedReaderExample{
    public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new FileReader("C:/Hello.txt"));
    String line="";
    while((line = in.readLine()) != null){
    System.out.println(line);
    }
    in.close();
  }
}


Related Tutorials/Questions & Answers:
BufferedReader
BufferedReader  What is BufferedReader used for?   BufferedReader read text from a character-input stream, buffering characters so... IOException { BufferedReader in = new BufferedReader(new FileReader("C:/Hello.txt
Java bufferedreader
bufferedreader class? How bufferedreader can be used to read a file? Thanks   In Java the BufferedReader class is used to read the stream successfully with buffering. The BufferedReader class provides efficient reading from the input
Advertisements
Read bufferedreader
Read bufferedreader  Tell me the example of Read file using bufferedreader. Thanks   Read the tutorial Reading file using BufferedReader class. Thanks
About BufferedReader
About BufferedReader   I have created FileInputStream fstream..."); DataInputStream in = new DataInputStream(fstream); BufferedReader bfr = new BufferedReader(new InputStreamReader(in)); for(int i=0;i<10;i++) { String Str
Bufferedreader example
Bufferedreader example Here we have provided the best links for Bufferedreader class examples. You can use Bufferedreader class for buffering while reading... of Bufferedreader class Bufferedreader tutorial Bufferedreader Thanks
Why bufferedreader is used in java?
Why bufferedreader is used in java?  Hi, What is the use of BufferedReader class in Java? why bufferedreader is used in java? It will be great if anyone can give me the example code of BufferedReader class in java. Thanks
convert it to BufferedReader class
convert it to BufferedReader class  import java.util.*; public class method { static Scanner console = new Scanner (System.in); public static...; double average; BufferedReader br=new BufferedReader(new InputStreamReader
BufferedReader in java
BufferedReader in java In this section you will learn about BufferedReader..., this class contain BufferedReader under the package java.io.BufferedReader...., it is advisable to use BufferedReader . BufferedReader br = new BufferedReader(new
Java IO BufferedReader
Java IO BufferedReader In this section we will discuss about the BufferedReader class in Java. BufferedReader class in java.io package is used for read... be specified. In most of the purposes default size of buffer is used. BufferedReader
Convert InputStream to BufferedReader
Convert InputStream to BufferedReader   ... Inputstream to Bufferedreader. The class ... a input stream. java.io. BufferedReader class provides efficient way
what is the default buffer size for bufferedreader
is the default buffer size for bufferedreader? Is there any example of reading the big... of the BufferedReader class is 8192 chars, which is sufficient for general programming
BufferedReader in Java
BufferedReader in Java is used to to read characters, arrays, lines and File... can change the buffer size or can use default size. BufferedReader class in Java... by line data from a file using BufferedReader. BufferedReader Constructor
How To Read File In Java with BufferedReader
How To Read File In Java with BufferedReader class - example code This tutorial shows you how you can read file using BufferedReader class in your program. This tutorial is using the BufferedReader class for reading simple text file
What is the use of BufferedReader in Java program?
Learn about BufferedReader class and understand "What is the use of BufferedReader in Java program?" In this article I will explain you the benefits and uses of BufferedReader class in Java. In Java there are classes for reading
How to Read a file line by line using BufferedReader?
How to Read a file line by line using BufferedReader?  Hello Java... and found that BufferedReader can be used. So, help me and let's know How to Read a file line by line using BufferedReader, efficiently and using less memory
SCJP Module-10 Question-10
FileReader("new.txt"); BufferedReader br = new (2) Place code here...) FileReader  (Y) br.readLine() (Z) BufferedReader(fr) Options: (A) 1-X
Java File Writing Example
the fileWriter object to the BufferedReader constructor. and write some data... location as roseindia/file.txt"); BufferedReader br=new BufferedReader(new... File Data"); BufferedReader bufferedData=new BufferedReader(new
Java read file
to read text File line by line. BufferedReader is also used to read a file in Java.... FileInputStream is used for reading streams of raw bytes. BufferedReader BufferedReader class read text from a character-input stream rather than read one
Java Read File Line by Line - Java Tutorial
and BufferedReader classes. This example of reading file is efficient and can... the BufferedReader class to read the data from stream line by line, application... How To Read File In Java with BufferedReader Read File in Java
java code
java code  what is meaning bufferedreader
java code
java code  what is meaning bufferedreader
Java DataInputStream
Java DataInputStream   What is the difference between DataInputStream and BufferedReader
BufferReader example in Java
Read File Line by line using BufferedReader... BufferedReader In this section you will learn how to read line by line data from a file using BufferedReader. In this section, we provide you two examples
.bad file
.bad file  hi how can end this while dose not terminated Runtime r = Runtime.getRuntime(); Process p = r.exec("Run.bat"); BufferedReader reader = new BufferedReader(new InputStreamReader(new
.bat file
.bat file  hi how can end this while dose not terminated Runtime r = Runtime.getRuntime(); Process p = r.exec("Run.bat"); BufferedReader reader = new BufferedReader(new InputStreamReader(new
i am unable to identify the error in my code
i am unable to identify the error in my code  class Program { public static void main(String[] args) { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter
i am unable to identify the error in my code
i am unable to identify the error in my code  class Program { public static void main(String[] args) { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter
tcp client server communication
(); BufferedReader inFromClient = new BufferedReader(new InputStreamReader... DataOutputStream(connectionSocket.getOutputStream()); BufferedReader serverInput = new BufferedReader(new InputStreamReader(System.in)); sentence
prime number
prime number  HI!I want a java program that accepts a number from user and displays whether it is a prime number or not using BufferedReader
java - Java Beginners
[]) throws i/oException { BufferedReader br=new BufferedReader (new... static void main(String args[]) throws IOException { BufferedReader br=new BufferedReader (new InputStreamReader(System.in)); System.out.println("enter a char
about predefine classes.....
....pls help like below code is given in program of palindrome BufferedReader object = new BufferedReader( new InputStreamReader(System.in)); here what is the work of BufferedReader class and InputStreamReader...... pls tell
Advertisements
 

 

 

DMCA.com