static private TableB readEcmwfTableB(InputStream ios, TableB b) throws IOException { int count = 0; List<TableParser.Record> recs = TableParser.readTable(ios, "4i,7i,72,97,102i,114i,119i", 50000); for (TableParser.Record record : recs) { if (record.nfields() < 7) { continue; } int x = (Integer) record.get(0); int y = (Integer) record.get(1); String name = (String) record.get(2); String units = (String) record.get(3); int scale = (Integer) record.get(4); int ref = (Integer) record.get(5); int width = (Integer) record.get(6); b.addDescriptor((short) x, (short) y, scale, ref, width, name, units); /* System.out.println("Table B line =" + record); System.out.printf("%d %d, %d %d %d %s %s %n", x, y, scale, ref, width, name, units); if (count > 10) break; count++; */ } ios.close(); return b; }
static private TableB readEcmwfTableB(InputStream ios, TableB b) throws IOException { List<TableParser.Record> recs = TableParser.readTable(ios, "4i,7i,72,97,102i,114i,119i", 50000); for (TableParser.Record record : recs) { if (record.nfields() < 7) { continue; } int x = (Integer) record.get(0); int y = (Integer) record.get(1); String name = (String) record.get(2); String units = (String) record.get(3); int scale = (Integer) record.get(4); int ref = (Integer) record.get(5); int width = (Integer) record.get(6); b.addDescriptor((short) x, (short) y, scale, ref, width, name, units, null); /* System.out.println("Table B line =" + record); System.out.printf("%d %d, %d %d %d %s %s %n", x, y, scale, ref, width, name, units); if (count > 10) break; count++; */ } return b; }