perwendel/spark — pull request #69 by benharper123 (2013-05-14 12:13:24+00:00)
Title: Binary-safe Response and Requests

Many internal buffers have been changed from String to
byte[]. Wherever we need to convert between the two, we
use the function SparkUtils.stringToBytes or
SparkUtils.bytesToString, which uses UTF-8 always.

In order to read the request body as a byte[], one uses
Request.bodyBytes().

In order to write a response as a byte[], one simply
returns a byte[] from the handler.

All the existing tests pass without alteration,
so I hope this doesn't break existing code.

There is one new test which demonstrates the binary-safe IO.