最简单的方法: 利用javax.xml.bind包下的DatatypeConverter printHexBinary public static java.lang.String printHexBinary(byte[] val) Converts an array of bytes into a string. Parameters: val - An array of bytes Returns: A string containing a lexical representation…
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package test.util; /** * * @author Administrator */ public class StringUtil { public StringUtil() { } /** * 将指定byte数组以16进制的形式打印到控制台 * @param hint String…