Here you can find the source of byteToHex(byte b)
Parameter | Description |
---|---|
b | - the byte to format as a hexadecimal String. |
public static String byteToHex(byte b)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w w w . j ava 2s . c om*/ * Returns the hexadecimal representation of a byte. * * @param b - the byte to format as a hexadecimal String. * @return the hexadecimal representation of the given byte. */ public static String byteToHex(byte b) { return String.format("%02X", b); } }