Override ByteArrayOutputStream::write(byte[],int,int). Fixes #322.