Defines codecs, decoders, and encoders, for translating between binary content and encoded bytes.

Class name

Description

{@link com.buck.common.codec.Codec} A named mapping between characters
and bytes
{@link com.buck.common.codec.CodecDecoder}  Decodes encoded bytes into binary content
{@link com.buck.common.codec.CodecEncoder}  Encodes binary content into bytes

A codec is named mapping between sequences of raw bytes, and sequences of encoded bytex, in the sense defined in RFC 4648. A decoder is an engine which transforms encoded bytes in a specific encoding into raw bytes (binary content), and an encoder is an engine which transforms bytes (binary content) into an encoded sequence of bytes. Encoders and decoders operate on byte buffers. They are collectively referred to as codecs.

The {@link com.buck.common.codec.Codec} class defines methods for creating coders for a given codec and for retrieving the various names associated with a codec. It also defines static methods for testing whether a particular codec is supported, for locating codec instances by name, and for constructing a map that contains every codec for which support is available in the current Java virtual machine.

Most users will not use these classes directly; instead they will use the existing codec-related services such as XML serialization, which may have been reworked to make use of the codec facilities defined in this package.

Support for new codecs can be made available via the interface defined in the {@link com.buck.common.codec.spi.CodecProvider} class in the {@link com.buck.common.codec.spi} package. @author Robert J. Buck