please tell me what exactly buffer is ? i have searched google.com a lot but not find what exactly it means ? what it means if i say "flushing the buffer"..? please tell me..what exactly is it ??

Recommended Answers

All 4 Replies

In simple terms you can assume a buffer to be a temporary storage area. Think of it in this way,
suppose you bring a book from place A and give it your friend to keep it in place B. By the time your friend goes to place B ,you fetch another book from place A. Your friend is of smaller age so takes longer to return each time.Now you decide to place a table in between.Each time you get a book you place it on the table and continue with getting other books. When your friend comes back he can take the book from the table. Here the table is a buffer.
Apart from synchronizing speeds, many times buffers are used to fetch data quicker. The data that is required more frequently is placed into buffers. Disk accesses (which are slower) are thus avoided for frequently needed data.

Flushing a buffer basically means transferring data from memory to disk.

In simple terms you can assume a buffer to be a temporary storage area. Think of it in this way,
suppose you bring a book from place A and give it your friend to keep it in place B. By the time your friend goes to place B ,you fetch another book from place A. Your friend is of smaller age so takes longer to return each time.Now you decide to place a table in between.Each time you get a book you place it on the table and continue with getting other books. When your friend comes back he can take the book from the table. Here the table is a buffer.
Apart from synchronizing speeds, many times buffers are used to fetch data quicker. The data that is required more frequently is placed into buffers. Disk accesses (which are slower) are thus avoided for frequently needed data.

Flushing a buffer basically means transferring data from memory to disk.

yoo! a too impressive answer! will you please tell that what is "buffered standard input stream"? in this what meant by "buffered" ?

You might want to check out some links.Here is one
http://mindprod.com/jgloss/buffer.html

please read my one more post. as i want to learn servlet sessions and structs give me links for that plese help!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.