java - How to convert BigDecimal to hex string? -


i have number of type bigdecimal, example 18446744073709551616, , want convert hexadecimal value.

is there way instead of doing manually?

judging example should rather use biginteger bigdecimal. try maybe way

new biginteger("18446744073709551616").tostring(16) 

or if cant change type of object convert biginteger before

new bigdecimal("18446744073709551616").tobiginteger().tostring(16); 

Comments

Popular posts from this blog

php - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

authentication - ASP.NET Core 1.0. Bearer Token, cannot access custom claims -