Android examples for java.lang:Hex
Convert byte to Hex string by single statement
//package com.java2s; public class Main { public static String toHex(byte b) { return ("" + "0123456789ABCDEF".charAt(0xf & b >> 4) + "0123456789ABCDEF" .charAt(b & 0xf));/*from w w w. jav a 2 s. co m*/ } }