Snippet IT IT News, Programming, Internet and Blogging

22May/090

Java: Format Bytes Array into Hexadecimal String

Sometimes, we may want to format a bytes array into hexadecimal (base-16) format for debugging purpose or for betterĀ readability. One byte has 8 bits and one byte can be represent by two hexadecimal characters (0 - 15 and A - F).