JavaDeploy
SiteMap
Readers Writers
Java Streams
Java Programming
Java Language
Java Streams
«Prev
Next»
Java Streams
Stream Basics
Stream Input Definition
Roller Coaster Analogy
Input Streaming Data
System in-out
Additional Sources for I/O Streams
Java Stream Classes
I/O Stream Conclusion
Data Stream Reading
Reading Data from Streams
Efficient byte array Buffer
Counting available Bytes
Closing Stream Data
Writing Data Streams
Writing Data to Stream
Java Write Method
Java System.out
Java Write Byte
Java IO Flush
Java File Streams
Using Filestream
Character Mode DumpsFile
WritingData OutputStreams Conclusion
Filtering Streams
Chaining Streams
Marking Resetting Java Streams
Marking resetting Methods
Treating Arrays as Streams
Streaming Data between Threads
Java Input Streams - Quiz
Each question is worth one point. Select the best answer for each question.
1.
Which one of the following statements about reading input streams is true?
Please select the best answer.
A.
When no bytes are available to be read, the available() method returns -1
B.
The InputStream class can never be instantiated directly
C.
All streams must be explicitly closed with the close() method
D.
read() returns a stream of bytes
2.
The maximum number of bytes that can be skipped past in one method call is:
Please select the best answer.
A.
32,767
B.
2,147,483,647
C.
4,294,967,294
D.
9,223,372,036,854,775,807
3.
What data type does the read() method return?
Please select the best answer.
A.
byte
B.
int
C.
long
D.
short
4.
Which decimal number indicates end-of-stream?
Please select the best answer.
A.
0
B.
-1
C.
4
D.
28
Your score is 0.0
Submit
Quiz Explanation