public static long parseLong(String number) {
		if (StrUtil.isBlank(number)) {
			return 0L;
		}

		if (number.startsWith("0x")) {
			// 0x04表示16进制数
			return Long.parseLong(number.substring(2), 16);
		}

		try {
			return Long.parseLong(number);
		} catch (NumberFormatException e) {
			return parseNumber(number).longValue();
		}
	}
@Test
	public void parseLongTest() {
		long number = NumberUtil.parseLong("0xFF");
		assertEquals(255, number);

		// 0开头
		number = NumberUtil.parseLong("010");
		assertEquals(10, number);

		number = NumberUtil.parseLong("10");
		assertEquals(10, number);

		number = NumberUtil.parseLong("   ");
		assertEquals(0, number);

		number = NumberUtil.parseLong("10F");
		assertEquals(10, number);

		number = NumberUtil.parseLong("22.4D");
		assertEquals(22, number);

		number = NumberUtil.parseLong("22.6D");
		assertEquals(22, number);

		number = NumberUtil.parseLong("0");
		assertEquals(0, number);

		number = NumberUtil.parseLong(".123");
		assertEquals(0, number);
	}