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
Can a private method of a superclass be declared within a subclass?
What is reverse function?
What are the three types of design patterns?
What is mean by collections in java?
What environment variables are required to be set on a machine in order to run Java programs?
What is array command?
Can we extend singleton class in java?
hr interview how many minutes asking question
What is a boolean output?
'A class is a template for an object' explain this statement.
How do you sort in java?
Is java a compiler?
What is method overloading in java ?
Convert Binary tree to linked list.
Explain the key functions of data binding?