jsevellec/cassandra-unit — pull request #54 by marccarre (2013-01-15 07:25:10+00:00)
Title: Binary data can now be formatted as Base64 encoded strings in data-set files.

**Rationale**:

Binary data is traditionally represented as Base64 encoded strings in textual formats like XML, JSON and YAML; and this is the defaut format for many libraries and languages when it comes to serialize binary data in one of these formats.

Currently cassandra-unit only supports conversion to hexadecimal, which makes it uneasy to directly re-use existing data for testing purposes in Cassandra.

With this commit, cassandra-unit tries to be a bit more clever and detect when binary data is provided as a hexadecimal or a Base64 string, and perform the right conversion.

See also:
- http://yaml.org/type/binary.html
- http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#base64Binary
Default format for binary data is Base64 for Jackson JSON and Python (non-exhaustive):
- http://www.cowtowncoder.com/blog/archives/2009/10/entry_330.html
- http://docs.python.org/2/library/json.html

**Changelog**:
- Added logic to identify hex and base64 encoded strings.
- Base64 decoding done using http://migbase64.sourceforge.net (much faster than other implementations), licensed under BSD license.
- Unit tests for XML, JSON and YAML.
- Integration test in DataLoaderTest.