public static double[] fromString(String data,String separator){
  String[] split=data.split(separator);
  double[] ret=new double[split.length];
  for (int i=0; i < split.length; i++) {
    ret[i]=Double.parseDouble(split[i]);
  }
  return ret;
}

public static double [ ] fromString ( String data , String separator ) { String [ ] split = data . split ( separator ) ; double [ ] ret = new double [ split . length ] ; for ( int i = 0 ; i < split . length ; i ++ ) { ret [ i ] = Double . parseDouble ( split [ i ] ) ; } return ret ; }
this will take a given string and separator and convert it to an equivalent double array .
