Searched refs:bcd (Results 1 – 1 of 1) sorted by relevance
91 public static byte[] bcdToBytes(String bcd) { in bcdToBytes() argument92 byte[] output = new byte[(bcd.length() + 1) / 2]; in bcdToBytes()93 bcdToBytes(bcd, output); in bcdToBytes()104 public static void bcdToBytes(String bcd, byte[] bytes) { in bcdToBytes() argument105 bcdToBytes(bcd, bytes, 0); in bcdToBytes()116 public static void bcdToBytes(String bcd, byte[] bytes, int offset) { in bcdToBytes() argument117 if (bcd.length() % 2 != 0) { in bcdToBytes()118 bcd += "0"; in bcdToBytes()120 int size = Math.min((bytes.length - offset) * 2, bcd.length()); in bcdToBytes()122 bytes[j] = (byte) (charToByte(bcd.charAt(i + 1)) << 4 | charToByte(bcd.charAt(i))); in bcdToBytes()