code: protected static String formatMDLFloat(float fl) {
          String s = "", fs = "";
          int l;
          NumberFormat nf = NumberFormat.getNumberInstance(Locale.ENGLISH);
          nf.setMinimumIntegerDigits(1);
          nf.setMaximumIntegerDigits(4);
          nf.setMinimumFractionDigits(4);
          nf.setMaximumFractionDigits(4);
          nf.setGroupingUsed(false);
          if (Double.isNaN(fl) || Double.isInfinite(fl))
              s = "0.0000";
          else
              s = nf.format(fl);
          l = 10 - s.length();
          for (int f = 0; f < l; f++)
              fs += " ";
          fs += s;
          return fs;
      }
docs: Formats a float to fit into the connectiontable and changes it
  to a String.
  
  @param fl The float to be formated
  @return The String to be written into the connectiontable