Here you can find the source of bcd2str(byte[] b)
private static String bcd2str(byte[] b)
//package com.java2s; //License from project: Open Source License public class Main { private static String bcd2str(byte[] b) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < b.length; ++i) { int h = ((b[i] & 255) >> 4) + 48; sb.append((char) h); int l = (b[i] & 15) + 48; sb.append((char) l); }/*w ww . j a v a2 s .c o m*/ return sb.toString(); } }