While exceptionally unlikely, this has lead to corruption in the past. You need to check the return value of .write() and loop until all bytes are written.

I've got a branch that adds .writeAll() to the StoreChannel, so if you like, we can merge this and then swap it to use that.