是否可以将 BigDecimal 转换为十六进制?

Is it possible to convert a BigDecimal to Hexadecimal?

基本上是标题。我知道您可以通过执行 BigInteger.toString(16) 将 BigInteger 转换为 Hex,但您不能对 BigDecimal 执行相同的操作。有什么简单的方法可以做到这一点?如果没有,有没有办法按百分比 increase/decrease BigInteger?

BigDecimal bd = new BigDecimal(10.0001)
String hexadecimal = bd.toBigInteger().toString(16);