List of usage examples for javax.xml.bind DatatypeConverter printDecimal
public static String printDecimal(java.math.BigDecimal val)
Converts a BigDecimal value into a string.
From source file:org.openestate.io.wis_it.WisItUtils.java
public static String printDecimal(BigDecimal value) { if (value == null) throw new IllegalArgumentException("Can't print decimal value!"); else//ww w. ja v a 2 s .c om return DatatypeConverter.printDecimal(value.setScale(2, BigDecimal.ROUND_HALF_UP)); }