What is the diff. in reading the input by BufferedReader and by DataInputStream?And what data type do they return?

Showing Answers 1 - 2 of 2 Answers

Chinnu

  • Nov 17th, 2006
 

The Two main catagories of Java IO are Readers/Writers and Streams. Stream deal with characters and Reader/Writer deal with bytes. So they are differentiated by the kind of data they deal with.A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.Read text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.

  Was this answer useful?  Yes

shan

  • Jan 10th, 2007
 

DataInputStream is used to read primitive data types from underlying input stream whereas Bufferedinputstream used to read bytes from a stream without neccessary causing a call to each byte to the stream

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions