public static byte[] getBCDcode(long data) {
		int seq = 0;
		byte[] tmp = new byte[20];
		while ((data >= 1L) && (seq < 20)) {
			byte t = (byte) (int) (data % 10L);
			tmp[(seq++)] = t;

			data /= 10L;
		}
		byte[] tmp2 = new byte[seq];
		System.arraycopy(tmp, 0, tmp2, 0, seq);


		int length2 = seq / 2 + 1;
		byte[] result = new byte[length2];
		if (seq % 2 != 0) {
			int k = -2;
			for (int i = 0; i < length2; i++) {
				k += 2;
				if (k == tmp2.length - 1) {
					result[i] = ((byte) (tmp2[k] | 0xF0));
				} else {
					result[i] = ((byte) (tmp2[k] | tmp2[(k + 1)] << 4));
				}
			}
		} else {
			int k = -2;
			for (int i = 0; i < length2; i++) {
				k += 2;
				if (k > tmp2.length - 1) {
					result[i] = -1;
				} else {
					result[i] = ((byte) (tmp2[k] | tmp2[(k + 1)] << 4));
				}
			}
		}
		return result;
	}