No Bits Allowed: Encoding and Decoding Binary Data

If you are processing or generating binary data, you may need to place this data into a String at some time. Most in-memory binary data is stored within byte arrays but is often converted into hexadecimal (base 16) or binary (base 2) Strings for display, storage, or transmission. For example, you may want to include some binary data within a text-based document such as an XML file, send it within an email, or use it in other places where non-text characters would cause problems. A decimal (base 10) representation is less desirable than a hexadecimal, because a decimal number does not ...

Get Wicked Cool Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.