hex String <-> byte array 변환 1. hex string -> byte array byte[] bytes = new java.math.BigInteger(hexText, 16).toByteArray(); 2. byte array -> hex string String hexText = new java.math.BigInteger(bytes).toString(16); Sample public static String toHexString(byte buf[]) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < buf.length; i++) { sb.append(Integer.toHexString(0x0100 + (buf[i] & 0x00FF)).substring(1)); } retur.. 더보기 이전 1 ··· 8 9 10 11 12 다음