code: public static double[] doublesFrom(InputStream is) {
          ArrayList<Double> doubles = new ArrayList<Double>();
          for (String line : new LineReader(is)) {
              if (line.length() > 0 && !line.startsWith("#"))
                  doubles.add(Double.parseDouble(line));
          }
          // copy it, because we can't cast from Double to double...
          double[] ret = new double[doubles.size()];
          for (int i = 0; i < doubles.size(); i++) {
              ret[i] = doubles.get(i);
          }
          return ret;
      }
docs: One double per line. Empty lines and lines starting with # are skipped.
  
  @return an array of doubles from this file