(boolean loading, String filename, String options)
| 306 | static final String[] saveExtensions = { "csv", "tsv", "ods", "bin", "html" }; |
| 307 | |
| 308 | static public String extensionOptions(boolean loading, String filename, String options) { |
| 309 | String extension = PApplet.checkExtension(filename); |
| 310 | if (extension != null) { |
| 311 | for (String possible : loading ? loadExtensions : saveExtensions) { |
| 312 | if (extension.equals(possible)) { |
| 313 | if (options == null) { |
| 314 | return extension; |
| 315 | } else { |
| 316 | // prepend the extension to the options (will be replaced by other |
| 317 | // options that override it later in the load loop) |
| 318 | return extension + "," + options; |
| 319 | } |
| 320 | } |
| 321 | } |
| 322 | } |
| 323 | return options; |
| 324 | } |
| 325 | |
| 326 | |
| 327 | protected void parse(InputStream input, String options) throws IOException { |
no test coverage detected