Here you can find the source of convert(long value, long factor, int comma)
private static BigDecimal convert(long value, long factor, int comma)
//package com.java2s; //License from project: Open Source License import java.math.*; public class Main { /**/*from ww w .j a v a 2 s. c om*/ * Converter from long to bigDecimal */ private static BigDecimal convert(long value, long factor, int comma) { BigDecimal retVal = new BigDecimal(value); retVal = retVal.divide(new BigDecimal(factor), comma, BigDecimal.ROUND_HALF_UP); return retVal; } }