private static String dblString(double decimalValue,int availableSpace){
  return dblString(BigDecimal.valueOf(decimalValue),-1,availableSpace);
}

private static String dblString ( double decimalValue , int availableSpace ) { return dblString ( BigDecimal . valueOf ( decimalValue ) , - 1 , availableSpace ) ; }
create a string from a bigdecimal making sure that it ' s not longer than the available space .
