标签:
package com.tv.ui.metro.utils;
import java.math.BigInteger;
/**
* Created by Administrator on 16-4-9.
*/
public class NumberConverter {
public static Long HexToLongDecimal(String s) {
return Long.parseLong(s, 16);
}
public static BigInteger HexToBigIntDecimal(String s) {
return new BigInteger(s, 16);
}
public static String LongDecimalToHex(Long l) {
return Long.toHexString(l);
}
public static String BigIntDecimalToHex(String s) {
return new BigInteger(s, 10).toString(10);
}
}
标签:
原文地址:http://www.cnblogs.com/----------/p/5370980.html