code: public static float[] parseFloatArray (String source)
      {
          StringTokenizer tok = new StringTokenizer(source, ",");
          float[] vals = new float[tok.countTokens()];
          for (int i = 0; tok.hasMoreTokens(); i++) {
              try {
                  // trim the whitespace from the token
                  vals[i] = Float.parseFloat(tok.nextToken().trim());
              } catch (NumberFormatException nfe) {
                  return null;
              }
          }
          return vals;
      }
docs: Parses an array of floats from it's string representation. The array should be represented
  as a bare list of numbers separated by commas, for example:
  
  <pre>25.0, .5, 1, 0.99</pre>
  
  Any inability to parse the array will result in the function returning null.