public List<Triangle> parse(String path) {
        List<Triangle> result = null;        
        BufferedReader reader = null;
        
        try {        
            if (path.startsWith("classpath:")) {
                path = path.substring("classpath:".length());
                reader = new BufferedReader(new InputStreamReader(this.getClass().getResourceAsStream(path)));
            } else {
                reader = new BufferedReader(new InputStreamReader(new FileInputStream(path)));
            }

            result = read(reader);
            
        } catch (IOException ex) {
            ex.printStackTrace();
        } finally {
            try {
                if (reader != null) {
                    reader.close();
                }
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }
        
        return result != null ? result : Collections.<Triangle>emptyList();
    }