Welcome. Commons Codec provides implementations of common encoders and decoders such as Base64, Hex, various phonetic encodings, and URLs.
Codec was formed as an attempt to focus development effort on one definitive implementation of the Base64 encoder. At the time of Codec's proposal, there were approximately 34 different Java classes that dealt with Base64 encoding spread over the Foundation's CVS repository. Developers in the Jakarta Tomcat project had implemented an original version of the Base64 codec which had been copied by the Commons HttpClient and Apache XML project's XML-RPC subproject. After almost one year, the two forked versions of Base64 had significantly diverged from one another. XML-RPC had applied numerous fixes and patches which were not applied to the Commons HttpClient Base64. Different subprojects had differing implementations at various levels of compliance with the RFC 2045.
Out of that confusing duplication of effort sprang this simple attempt to encourage code reuse among various projects. While this package contains a abstract framework for the creation of encoders and decoders, Codec itself is primarily focused on providing functional utilities for working with common encodings.
Codec is currently comprised of a modest set of utilities and a simple framework for encoding and decoding both textual and binary data.
| Base64 | Provides Base64 content-transfer-encoding as defined in RFC 2045. This encoder can optionally create 76 character chunked output for strict adherence to RFC 2045. |
| Hex | Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order |
| BinaryCodec | Translates between byte arrays and strings of "0"s and "1"s. |
| Soundex | Implementation of the Soundex algorithm. |
| Metaphone | Implementation of the Metaphone algorithm. |
| Refined Soundex | Alternative implementation of the Soundex algorithm. |
| Double Metaphone | Alternative implementation of the Metaphone algorithm. |
| DigestUtils | Provides simple static methods for creating a SHA or MD5 digest. |
| URLCodec |
Implements the www-form-urlencoded encoding scheme, also misleadingly known as URL encoding.
|
| QuotedPrintableCodec | Codec for RFC 1521 MIME (Multipurpose Internet Mail Extensions) Part One. Rules #3, #4, and #5 of the quoted-printable spec are not implemented yet |
| BCodec | Identical to the Base64 encoding defined by RFC 1521 and allows a character set to be specified. |
| QCodec | Similar to the Quoted-Printable content-transfer-encoding defined in RFC 1521 and designed to allow text containing mostly ASCII characters to be decipherable on an ASCII terminal without decoding. |