Ak Rahul wrote:Hi,
Generally, we use buffer streams...which reads/loads everything in the memory .
Not true. Buffered streams hold some of a file/stream in a buffer in memory but not usually the whole stream content unless the stream is shorter than the buffer size. If the whole stream content is in memory then you must have allocated the space and filled it.