二进制和十六进制的相互转换工具类: package com.gzcivil.utils; public class BinStr { /** * 将二进制转换成16进制 * @param buf * @return */ private static char szbyte2str[][] = { {'0','0'},{'0','1'},{'0','2'},{'0','3'},{'0','4'},{'0','5'},{'0','6'},{'0','7'}, {'0','8'},{'0','9'}…