Searched refs:bcd (Results 1 – 1 of 1) sorted by relevance
82 public static byte[] bcdToBytes(String bcd) { in bcdToBytes() argument83 byte[] output = new byte[(bcd.length() + 1) / 2]; in bcdToBytes()84 bcdToBytes(bcd, output); in bcdToBytes()95 public static void bcdToBytes(String bcd, byte[] bytes) { in bcdToBytes() argument96 bcdToBytes(bcd, bytes, 0); in bcdToBytes()107 public static void bcdToBytes(String bcd, byte[] bytes, int offset) { in bcdToBytes() argument108 if (bcd.length() % 2 != 0) { in bcdToBytes()109 bcd += "0"; in bcdToBytes()111 int size = Math.min((bytes.length - offset) * 2, bcd.length()); in bcdToBytes()113 bytes[j] = (byte) (charToByte(bcd.charAt(i + 1)) << 4 | charToByte(bcd.charAt(i))); in bcdToBytes()