That manages about 7 GiB/s reusing the same buffer, or about 300 MiB/s with clearing and refilling the buffer every time
(the magic is in using java’s APIs for writing to files/sockets, which are designed for high performance, instead of using the APIs which are designed for writing to stdout)
Using OP's code for following
Java print 1.3 Mb/sec Java with buffering 57.4 Mb/sec