Java BigInteger Calculate getRadixNumberInString(BigInteger integerNumber, int radix)

Here you can find the source of getRadixNumberInString(BigInteger integerNumber, int radix)

Description

This method gets the required representation of any number according to the given radix or base.

License

Open Source License

Parameter

Parameter Description
integerNumber A integer number
radix The radix or base to be used in the string representation

Return

The number representation in the specified radix

Declaration

public static String getRadixNumberInString(BigInteger integerNumber, int radix) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.math.BigInteger;

public class Main {
    /**//from  w  w w .jav  a  2s .  c  o m
     * This method gets the required representation of any number according to the
     * given radix or base.
     * @param integerNumber A integer number between {@link Integer#MIN_VALUE} and {@link Integer#MAX_VALUE}
     * @param radix The radix or base to be used in the string representation
     * @return The number representation in the specified radix
     */
    public static String getRadixNumberInString(Integer integerNumber, int radix) {
        return Integer.toString(integerNumber, radix);
    }

    /**
     * This method gets the required representation of any number according to the
     * given radix or base.
     * @param integerNumber A integer number
     * @param radix The radix or base to be used in the string representation
     * @return The number representation in the specified radix
     */
    public static String getRadixNumberInString(BigInteger integerNumber, int radix) {
        return integerNumber.toString(radix);
    }
}

Related

  1. getNRightmostBits(final BigInteger in, final int n)
  2. getNumbersBetweenRange(BigInteger minValue, BigInteger maxValue)
  3. getPrivateKey(BigInteger ran, BigInteger publicKey)
  4. getPrivateKeyBytes(BigInteger privateKey)
  5. getQosFlowId(short tableId, BigInteger dpId, int lportTag)
  6. getRandomBigInteger(int bits)
  7. getRandomInteger(BigInteger n, Random rand)
  8. getSize(BigInteger number)
  9. getValueWithUnit(BigInteger value, final int places)