ArrayList<Double> array = new ArrayList<Double>();
for (int i = 0; i < size; ++i) {
if (scanner.hasNextDouble()) {
array.add(new Double(scanner.nextDouble()));
} else {
throw new DataReadException("Reading array of double value error");
}
}
return array;
} else {
throw new DataReadException("Reading array of double value error");
}
}