If the application intentionally or unintentionally writes any bytes into the response buffer these bytes will be mixed with the contents of the file to be send. This is due to grizzly not providing a working api that would prevent the response buffer to be flushed into the SocketChannel.
An RFE was filed against grizzly as grizzly issue #336
.
Two known frameworks that write bytes into the response buffer when not expected: Ruby On Rails (in some situations) and non-xml based JSP
Once a grizzly API exists, it should be called from the SendfileFilter.