Sherman,
As a workaround, what about allowing a write of empty string or empty char
array to call flushBuffer? If you call PrintStream.print() then flushBuffer
is called on the internal writers. But if you try the same by doing
OuputStreamWriter.write() the flushbuffer call is trapped by a
Jason,
I might be misunderstanding your suggestion, but the current
implementation of
OutputStreamWriter.flushBuffer()/StreamWriter.implFlushBuffer() does not
flush
the encoder, so even the caller can choose when to invoke flushBuffer(),
it does
not solve the problem (flush() invokes
Sherman,
My mistake, I missed the fact that flushBuffer does not flush the encoder. I
incorrectly thought that write/print caused the encoder to flush and only the
direct call to OSW.flush did not.
Jason
Date: Thu, 9 Feb 2012 11:29:04 -0800
From: xueming.s...@oracle.com
To: