What is the difference between DataInputStream and
BufferedReader
Answer Posted / a
The DataInputStream works with the binary data, while the
BufferedReader work with character data.
All primitive data types can be handled by using the
corresponding methods in DataInputStream class, while only
string data can be read from BufferedReader class and they
need to be parsed into the respective primitives.
DataInputStream is a part of filtered streams, while
BufferedReader is not.
DataInputStream consumes less amount of memory space being
it is binary stream, where as BufferedReader consumes more
memory space being it is character stream.
The data to be handled is limited in DataInputStream, where
as the number of characters to be handled has wide scope in
BufferedReader.
Is This Answer Correct ? | 28 Yes | 1 No |
Post New Answer View All Answers
What is thread life cycle in java?
Give an example of use of pointers in java class.
Does list allow duplicates in java?
What are the four corner stones of oop?
How to optimize the javac output?
What are pass by reference and pass by value?
Explain about the select method with an example?
Why do we need hashmap in java?
What are the new features in java 8? Explain
What are the steps involved to create a bean?
What is an infinite loop?
What is string substring?
Which collection allows duplicate values in java?
Can you tell me range of byte?
how come we know the object is no more used in the class?