Internal buffer size of the OutputStreamWriter

I want to create unbuffered OutputStreamWriter

. docs say

The resulting bytes are buffered before being written to the main output stream. The size of this buffer can be, but by default it is large enough for most purposes.

"The size of this buffer can be specified" ... how?

+3


source to share


1 answer


Well, it looks like there is no way to adjust the buffer size. It was once possible to set the size in a constructor ... in Java 1.1 !

The constructor disappeared in Java 1.2 (1998) and apparently they forgot to update the documentation.



(I find it odd that this documentation error has gone unnoticed for so many years - and also odd that I can't turn buffering off.)

Update: Still the same in Java 8

+2


source







All Articles