Changeset 10409 in osm
- Timestamp:
- 2008-09-02T18:56:12+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/tagging-preset-tester/src/org/openstreetmap/josm/plugins/taggingpresettester/TaggingPresetTester.java
r9948 r10409 7 7 import java.io.IOException; 8 8 import java.io.InputStream; 9 import java.io.InputStreamReader; 10 import java.io.BufferedReader; 9 11 import java.net.URL; 10 12 import java.util.Collection; … … 40 42 if (source.startsWith("http") || source.startsWith("ftp") || source.startsWith("file")) 41 43 in = new URL(source).openStream(); 42 else if (source.startsWith("resource://"))43 in = TaggingPresetTester.class.getResourceAsStream(source.substring("resource:/".length()));44 44 else 45 45 in = new FileInputStream(source); 46 allPresets.addAll(TaggingPreset.readAll( in));46 allPresets.addAll(TaggingPreset.readAll(new BufferedReader(new InputStreamReader(in)))); 47 47 } catch (IOException e) { 48 48 e.printStackTrace();
Note:
See TracChangeset
for help on using the changeset viewer.