Writing to OutputStream in 64 kiB blocks

Removed unnecessary bodyLength variable