98-372 · Question #28
Which class adds a buffering layer to read and write operations on another stream and can be composed more or less for specific types of streams?
The correct answer is D. BufferedStream class. The BufferedStream class adds a buffering layer to read and write operations on another stream. It can be composed more or less for specific types of streams. It provides implementations for reading and writing bytes to an underlying data source. The BufferedStream class is desig
Question
Which class adds a buffering layer to read and write operations on another stream and can be composed more or less for specific types of streams?
Options
- AManagedStream class
- BStream class
- CUnmanagedStream class
- DBufferedStream class
How the community answered
(39 responses)- A8% (3)
- B13% (5)
- C5% (2)
- D74% (29)
Explanation
The BufferedStream class adds a buffering layer to read and write operations on another stream. It can be composed more or less for specific types of streams. It provides implementations for reading and writing bytes to an underlying data source. The BufferedStream class is designed to prevent the buffer from slowing down input and output when the buffer is not required. It also buffers reads and writes in a shared buffer. Answer: A and C are incorrect. There is no such class as ManagedStream or UnmanagedStream in the System.IO namespace. Answer: B is incorrect. A stream is a byte of data that reads and writes from and to a disk. The .NET Framework 2.0 provides the System.IO.Stream class as the base class for all the task- related stream data types. To read data in bytes is to transfer it from a stream into a data structure. To write data in bytes is to transfer it from a data structure into a stream. Streams support seeking, which queries and modifies the current position of data within a stream.
Topics
Community Discussion
No community discussion yet for this question.