Android examples for java.lang:Hex
Convert byte To Hex by String.format
/*//w w w . ja v a 2 s. c o m ByteUtil.java Copyright (c) 2016 NTT DOCOMO,INC. Released under the MIT license http://opensource.org/licenses/mit-license.php */ //package com.java2s; public class Main { public static String byteToHex(byte b) { return String.format("%02x", b & 0xff); } }