Fair enough, although these are mostly Java questions.
>1. Why everything is Hex
it's the easiest way to represent the data, bytes of encrypted data cannot be generally represented as Strings.
>2. What's the use of data[i] & 0xff?
bytes in Java are signed, the "& oxff" is required to make sure the resulting int is in the range 0 to 255.
>3. v >> 4
gives the high nibble (4 bits) of the byte, indexed into digits giving the matching character.
>4. v & 0xf
gives the low nibble of the byte, indexed into digits giving the matching character.
> what's the value addition this method is doing
Sorry, don't understand this question at all. If you're referring to the StringBuffer class append() method you can find the details in the StringBuffer JavaDoc.