Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between DataInputStream and
BufferedReader

Answers were Sorted based on User's Feedback



What is the difference between DataInputStream and BufferedReader..

Answer / 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

What is the difference between DataInputStream and BufferedReader..

Answer / rama

An important difference between the ...Stream classes and
the ...Reader/...Writer classes is that streams work with
binary data (in other words, raw bytes), while readers and
writers work with character data. In going from one to the
other there's always an encoding or decoding of data
involved.

The en-/decoding step can't be done in a meaningful way
unless one knows what encoding was used. Common encodings
are US-ASCII, UTF-8 and other Unicode variants, MacRoman,
ISO-8859-1 and CP1252. Furthermore, each platform (Windows,
Linux, OS X, ...) has its own default encoding, so if no
encoding is specified, the JVM will choose one - which may
well be the wrong one.

Is This Answer Correct ?    8 Yes 7 No

Post New Answer

More Core Java Interview Questions

What do you mean by an interface in java?

0 Answers  


Explain Method Overloading in Java.

1 Answers  


What is a final class in java?

0 Answers  


What is the default value of local and global variables?

0 Answers  


This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }

0 Answers   HCL,


Is double bigger than float?

0 Answers  


How do you check if a string contains only numeric digits?

0 Answers  


What are alternatives to java serialization?

0 Answers  


What is the maximum size of hashmap in java?

0 Answers  


Can a lock be acquired on a class?

3 Answers  


What is a numeric digit?

0 Answers  


Can we define constructor in inner class?

0 Answers  


Categories