Here you can find the source of toBigDecimal(byte[] bytes, int scale)
public static BigDecimal toBigDecimal(byte[] bytes, int scale)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; import java.math.BigInteger; import java.nio.ByteBuffer; public class Main { public static BigDecimal toBigDecimal(byte[] bytes, int scale) { return new BigDecimal(toBigInteger(bytes), scale); }//from w w w. j av a2 s .c o m public static BigDecimal toBigDecimal(ByteBuffer buffer, int scale) { return new BigDecimal(toBigInteger(buffer), scale); } public static BigInteger toBigInteger(byte[] bytes) { return new BigInteger(bytes); } public static BigInteger toBigInteger(ByteBuffer buffer) { return new BigInteger(buffer.array()); } }