标签:java javaee stringbuffer string x
public static String toHexString2(byte[] b) { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < b.length; ++i) { buffer.append(toHexString2(b[i])); } return buffer.toString(); } public static String toHexString2(byte b) { char[] buffer = new char[2]; buffer[0] = Character.forDigit((b >>> 4) & 0x0F, 16); buffer[1] = Character.forDigit(b & 0x0F, 16); return new String(buffer); }
java 16进制转换10进制,布布扣,bubuko.com
标签:java javaee stringbuffer string x
原文地址:http://blog.csdn.net/maskdfe/article/details/37764457