Here you can find the source of bcd2Str(byte[] bytes)
public static String bcd2Str(byte[] bytes)
//package com.java2s; //License from project: Apache License public class Main { public static String bcd2Str(byte[] bytes) { StringBuffer temp = new StringBuffer(bytes.length * 2); for (int i = 0; i < bytes.length; i++) { temp.append((byte) ((bytes[i] & 0xF0) >>> 4)); temp.append((byte) (bytes[i] & 0xF)); }/*from ww w . j av a2 s. c o m*/ return temp.toString().substring(0, 1).equalsIgnoreCase("0") ? temp.toString().substring(1) : temp.toString(); } }