Example usage for java.math BigInteger BigInteger

List of usage examples for java.math BigInteger BigInteger

Introduction

In this page you can find the example usage for java.math BigInteger BigInteger.

Prototype

private BigInteger(byte[] magnitude, int signum) 

Source Link

Document

This private constructor is for internal use and assumes that its arguments are correct.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    BigInteger bi = new BigInteger("1000", 8);
    s = bi.toString(8);/*from  ww w . j a va 2  s. c o m*/
}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    BigInteger bi = new BigInteger("4407760", 8);

}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    BigInteger bi = new BigInteger("4407760", 8);
    System.out.println(bi);//from   ww  w . ja  v a2 s  . c  om
}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    BigInteger bi = new BigInteger("100100100111111110000", 2);

    byte[] bytes = bi.toByteArray();
}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    BigInteger bi = new BigInteger("3ff", 16);
    String s = bi.toString(16);/*  w  w  w .ja v  a  2 s  . c  o m*/

}

From source file:Main.java

public static void main(String[] argv) throws Exception {

    BigInteger bi = new BigInteger("120ff0", 16);

}

From source file:Main.java

public static void main(String[] argv) throws Exception {

    BigInteger bi = new BigInteger("100101000111111110000", 2);

    byte[] bytes = bi.toByteArray();
}

From source file:Main.java

public static void main(String[] args) throws Exception {

    BigInteger mod = new BigInteger(2, new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 });

    System.out.println(mod);// w  ww.  ja  v a 2 s.c  om
}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    int radix = 32;
    BigInteger bi = new BigInteger("vv", radix);
    String s = bi.toString(radix);

}

From source file:Main.java

public static void main(String[] args) {
    Random randomGenerator = new Random();
    BigInteger randomInteger = new BigInteger(1024, randomGenerator);
    System.out.println(randomInteger);
}