Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A simple question?

 
okhand
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Who can tell me what the difference between out.clear() and out.clearBuffer() is? Please give me the examples in details. Thanks.
 
YanNaing WTint
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both clear the contents of the buffer. clearBuffer() merely clears the buffer but doesn't throw IOException if the buffer has already been flushed when clear() does.
BTW, pls revisit the Policies of login name and displayed name when you registered. "Use a fist name, a space, and a last name. No commas or underscores, and the last name must be more than one letter. Obviously fictitious names or improperly formatted names may be locked out. "
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!