I have the following in Kotlin to convert a BigInteger down to ordinary integer
BigInteger
integer
val bigIntDiv = bigIntVal?.div(BigInteger.valueO