• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

flush method

 
Raju Champaklal
Ranch Hand
Posts: 521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ca anyone explain my why do we use flush method on output streams and what is buffering? i couldnt this while part from the k&b book
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raju Champaklal wrote:i couldnt this while part from the k&b book

What?? Didn't you miss a few words there
 
Raju Champaklal
Ranch Hand
Posts: 521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it was a fill in the blanks problem...only with no blanks

please explain me the flush method....
 
Neha Daga
Ranch Hand
Posts: 504
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
flush method is used to make sure that every piece of data has been written out before you close the stream.

Buffering means rather than reading a unit data every time from the source a bunch of data is read and buffered (temporarily stored) in the buffered stream from where it is red one by one which saves us from complicated reading operations every time.
same is with buffered writing.

this is what i understood..but I think somewhere I am wrong, can somebody help me with these?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic