please refer kb6 book page 452. following is portion from the page
i'm having doubts on comments. it says that BufferedReader gets its data from a reader which gets its data from file. but then what is the function of Bufferedreader. it was supposed to read large chunks of data and save costly i/o read disk operations. but here it says that BufferedReader reads data from reader.still filereader has to read data from file character by character .please explain me where i'm wrong ?
I'll give you a practical example. When transporting bigger objects(Example : File) across network, due to unforeseen circumstances, there is chance when bytes get lost or get corrupted. Due to this, at the receiver end, even with proper header information the receiver would not be able to reconstruct the input object to its whole. This is where we use buffered streams wherein a bigger object can be easily built back at the receiver.