Byte input and output streams and character input and output streams in Java
Byte input and output streams and character input and output streams in Java
Which of the following stream classes is a character-oriented input stream ()
A BufferedWriter
B FileInputStream
C ObjectInputStream
D InputStreamReader
Resolution: IO stream
(1) byte input stream
Base Class: InputStream
FileInputStream, ByteArrayInputStream, PipedInputStream, BufferedInputStream, ObjectInputStream, FilterInputStream, PushbackInputStream, DataInputStream
(2) byte output stream
Base Class: OutputStream
FileOutputStream, ByteArrayOutputStream, PipedOutputStream, BufferedOutputStream, ObjectOutputStream, FilterOutputStream, PrintStream, DataOutputStream
(3) character input stream
Base Class: Reader
FileReader, CharArrayReader, PipedReader, StringReader, BufferedReader, InputStreamReader, FilterReader, PushbackReader
(4) character output stream
Base Class: Writer
FileWriter, CharArrayWriter, PipedWriter, StringWriter, BufferedWriter, OutputStreamWriter, FilterWriter, and PrintWriter
Answer: D.