@Test public void testPLine() throws IOException { URL url = this.getClass().getResource("pline.gp"); InputStream is = url.openStream(); GocadReaderParameters parameters = new GocadReaderParameters(); List<FastShape> shapes = GocadFactory.read(is, url, parameters); assertEquals(1, shapes.size()); assertEquals(2, shapes.get(0).getPositions().size()); }
public static List<FastShape> read(File file, GocadReaderParameters parameters) { try { return read(new FileReader(file), file.toURI().toURL(), parameters); } catch (MalformedURLException e) { return null; } catch (FileNotFoundException e) { e.printStackTrace(); return null; } }
GocadFactory { public static List<FastShape> read(File file, GocadReaderParameters parameters) { try { return read(new FileReader(file), file.toURI().toURL(), parameters); } catch (MalformedURLException e) { return null; } catch (FileNotFoundException e) { e.printStackTrace(); return null; } } }
GocadFactory { public static List<FastShape> read(File file, GocadReaderParameters parameters) { try { return read(new FileReader(file), file.toURI().toURL(), parameters); } catch (MalformedURLException e) { return null; } catch (FileNotFoundException e) { e.printStackTrace(); return null; } }  }
GocadFactory { public static List<FastShape> read(File file, GocadReaderParameters parameters) { try { return read(new FileReader(file), file.toURI().toURL(), parameters); } catch (MalformedURLException e) { return null; } catch (FileNotFoundException e) { e.printStackTrace(); return null; } }  static boolean isGocadFileSuffix(String suffix); static List<FastShape> read(File file, GocadReaderParameters parameters); static List<FastShape> read(InputStream is, URL context, GocadReaderParameters parameters); static List<FastShape> read(Reader reader, URL context, GocadReaderParameters parameters); }
GocadFactory { public static List<FastShape> read(File file, GocadReaderParameters parameters) { try { return read(new FileReader(file), file.toURI().toURL(), parameters); } catch (MalformedURLException e) { return null; } catch (FileNotFoundException e) { e.printStackTrace(); return null; } }  static boolean isGocadFileSuffix(String suffix); static List<FastShape> read(File file, GocadReaderParameters parameters); static List<FastShape> read(InputStream is, URL context, GocadReaderParameters parameters); static List<FastShape> read(Reader reader, URL context, GocadReaderParameters parameters);  }