(boolean loading, String filename, String options)
| 320 | static final String[] saveExtensions = { "csv", "tsv", "ods", "bin", "html" }; |
| 321 | |
| 322 | static public String extensionOptions(boolean loading, String filename, String options) { |
| 323 | String extension = PApplet.checkExtension(filename); |
| 324 | if (extension != null) { |
| 325 | for (String possible : loading ? loadExtensions : saveExtensions) { |
| 326 | if (extension.equals(possible)) { |
| 327 | if (options == null) { |
| 328 | return extension; |
| 329 | } else { |
| 330 | // prepend the extension to the options (will be replaced by other |
| 331 | // options that override it later in the load loop) |
| 332 | return extension + "," + options; |
| 333 | } |
| 334 | } |
| 335 | } |
| 336 | } |
| 337 | return options; |
| 338 | } |
| 339 | |
| 340 | |
| 341 | protected void parse(InputStream input, String options) throws IOException { |
no test coverage detected