• Post Reply Bookmark Topic Watch Topic
  • New Topic

from api

 
gul khan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello fellows in
print stream api it is written that
PrintWriter
public PrintWriter(OutputStream out,
boolean autoFlush)
Create a new PrintWriter from an existing OutputStream. This convenience constructor creates the necessary intermediate OutputStreamWriter, which will convert characters into bytes using the default character encoding.
Parameters:
out - An output stream
autoFlush - A boolean; if true, the println() methods will flush the output buffer

i m not sure what this autoflush true does , what i think is it reads line and when new line character is found it flushes
is it?
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is correct. Every time it finds a new line character, it will flush the buffer. Ohterwise, the buffer is only flushed when full or closed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!