What is the difference between DataInputStream and
BufferedReader

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between pointer and reference?

502


What is the applet security manager, and what does it provide?

534


How does thread synchronization occurs inside a monitor? What levels of synchronization can you apply?

540


make a method which any number and any type of argument and print sum of that arguments.....

1377


What is method with example?

577






Explain what do you mean by functional overloading in java?

555


What is visibility mode?

527


What is jar?

630


How do you call a reference in java?

515


What is a concrete classes? Is Java object class is concrete class?

510


what happens when a thread cannot acquire a lock on an object? : Java thread

536


What is anagram of a string?

515


Can we sort hashset in java?

624


Is void a type?

583


What are different exception types exceptions available in java ?

473