Java I/O Streams
Test your knowledge of Java I/O stream classes (InputStream, OutputStream, Reader, Writer), their methods, subclasses, and hierarchies.
Questions
Which of the following methods is/are defined in the OutputStream class?
- flush()
- write(byte[ ] b)
- write(byte[ ] b, int offset, int len)
- both 1 and 3
- all of these
Byte stream are defined by using _____ class hierarchies.
- four
- three
- two
- five
- none of these
Which of the following is/are the subclasses of the Output Stream class?
- Object Output Stream
- Piped Output Stream
- ByteOutputStream
- Both 1 and 2
- All of these
How many subclasses of Reader Class are there in Java?
- Nine
- Eight
- Seven
- Six
- Five
Which of the following methods is/are defined in the Reader class?
- skip(long)
- mark(int limit)
- reset()
- both 1 and 3
- all of these
The stream class can be categorized into how many groups depending upon the data on which they operate?
- 5
- 4
- 3
- 2
- None of these
Which of the following is/are not the subclasses of the Reader class?
- StringReader
- PipeReader
- InputReader
- Both 1 and 2
- Both 1 and 3
Which of the following is/are the subclasses of the InputStream class?
- StrBufferedInputStream
- FilterInputStream
- SequenceInputStream
- Both 2 and 3
- All of these
Which of the following is/are not the subclasses of Writer class in java?
- CharWriter
- StringWriter
- BufferedWriter
- Both 1 and 2
- Both 1 and 3
Which of the following methods is/are defined in the File class in Java?
- getPath()
- getName()
- length()
- both 1 &and 2
- all of these
Which of the following methods is/are defined in the InputStream class of Bytes Stream?
- read(byte[ ] b)
- mark(int limit)
- read()
- both 1 and 3
- all of these
How many subclasses of the Output Stream class are present in Java?
- Nine
- Six
- Five
- Eight
- Seven
Character Stream class is defined by using _____ class hierarchies.
- seven
- five
- two
- four
- none of these
How many subclasses of Writer class are there in Java?
- Seven
- Six
- Eight
- Nine
- Five
How many subclasses are there in the InputStream class?
- Nine
- Seven
- Eight
- Six
- Five