If you add
fileWriter.flush();
you can see the sizes have changed on each line. This means buffering is occurring.
Using the debugger I traced this to the StreamEncoder which doesn't have source in the Oracle JDK but is available on line
private static final int DEFAULT_BYTE_BUFFER_SIZE = 8192;
private StreamEncoder(OutputStream out, Object lock, CharsetEncoder enc) {
// some deleted
if (ch == null) {
bb = ByteBuffer.allocate(DEFAULT_BYTE_BUFFER_SIZE);
}
}
As you can see, the encoder has it's own buffer.
Note: since this is an internal class it may change in the future and it might not behave this way on all platforms.