Java BigInteger From ByteArrayToBigIntegerWithoutSign(byte[] array)

Here you can find the source of ByteArrayToBigIntegerWithoutSign(byte[] array)

Description

Convert an array of bytes to a non-negative big integer.

License

Mozilla Public License

Declaration

public static BigInteger ByteArrayToBigIntegerWithoutSign(byte[] array) 

Method Source Code


//package com.java2s;
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import java.math.BigInteger;

public class Main {
    /**//from  w  w w  .jav  a  2s .  co  m
     * Convert an array of bytes to a non-negative big integer.
     */
    public static BigInteger ByteArrayToBigIntegerWithoutSign(byte[] array) {
        return new BigInteger(1, array);
    }
}

Related

  1. byteArrayToBigInteger(final byte[] data)
  2. bytesToBigInteger(byte[] buffer)
  3. bytesToBigInteger(byte[] data)
  4. bytesToBigInteger(byte[] data, int[] offset)
  5. convertToBigInteger(String s)