Do not hardcode the char[] length in StringUtils
Throw IllegalStateException in StringUtils.hash()

instead of Log.

Also create UTF8 and SHA1 constant.
Use XmlStringBuilder in RosterPacket and XMPPError