Here you can find the source of bcd2Ascii(byte[] bytes)
public static byte[] bcd2Ascii(byte[] bytes)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] bcd2Ascii(byte[] bytes) { byte[] temp = new byte[bytes.length * 2]; for (int i = 0; i < bytes.length; i++) { temp[i * 2] = (byte) ((bytes[i] >> 4) & 0x0f); temp[i * 2 + 1] = (byte) (bytes[i] & 0x0f); }//w w w .jav a2 s . c om return temp; } }