Here you can find the source of bcdToByte(byte src)
private static byte bcdToByte(byte src)
//package com.java2s; //License from project: Apache License public class Main { private static byte bcdToByte(byte src) { byte re = src; if (src <= 0x09 && src >= 0x00) re = (byte) (src + 0x30); else if (src <= 0x0f && src >= 0x0a) re = (byte) (src + 0x37); return re; }// www . j av a 2 s .c om }