Thinking About Streams
Figure 15.12 shows a BufferedWriter object wrapped (Character Stream) with a PrintWriter object (Byte Stream).
a. What was the purpose of wrapping the BufferedWriter object?
Figure 15.6 shows System.out, an OutputStream object (Byte Stream) wrapped with a PrintWriter object (Byte Stream).
b. Check Sun’s documentation for PrintWriter and explain why it is legal to wrap PrintWriter around objects of two different hierarchies (Byte Stream and Character Stream).
c. Is it legal to wrap a PrintWriter with a BufferedWriter object?
If no, explain why not. If yes, explain a possible rationale for doing so.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.