Here you can find the source of byteArrayToHexString(byte[] bytes)
Parameter | Description |
---|---|
bytes | byte array to convert |
public static String byteArrayToHexString(byte[] bytes)
//package com.java2s; //License from project: Open Source License import javax.xml.bind.DatatypeConverter; public class Main { /**//from w w w .jav a 2s .c o m * Convert a byte array into a hex string. * @param bytes byte array to convert * @return the hex string */ public static String byteArrayToHexString(byte[] bytes) { return DatatypeConverter.printHexBinary(bytes); } }