Here you can find the source of BCD2ASC(byte[] bytes)
public static String BCD2ASC(byte[] bytes)
//package com.java2s; //License from project: Open Source License public class Main { public static String BCD2ASC(byte[] bytes) { char[] BToA = "0123456789abcdef".toCharArray(); StringBuffer temp = new StringBuffer(bytes.length * 2); for (int i = 0; i < bytes.length; i++) { int h = ((bytes[i] & 0xf0) >>> 4); int l = (bytes[i] & 0x0f); temp.append(BToA[h]).append(BToA[l]); }//from ww w . j a va 2s. co m return temp.toString(); } public static String toString(Object value) { return value == null || "null".equals(value.toString()) ? "" : value.toString(); } }