- static AltosStateIterable record_iterable(File file) {
- FileInputStream in;
- if (file.getName().endsWith("telem")) {
- try {
- in = new FileInputStream(file);
- return new AltosTelemetryFile(in);
- } catch (Exception e) {
- System.out.printf("Failed to open file '%s'\n", file);
- }
- } else {
-
- try {
- AltosEepromFile f = new AltosEepromFile(new FileReader(file));
- return f;
- } catch (Exception e) {
- System.out.printf("Failed to open file '%s'\n", file);
- }
+ static AltosRecordSet record_set(File file) {
+ try {
+ return AltosLib.record_set(file);
+ } catch (IOException ie) {
+ System.out.printf("%s\n", ie.getMessage());