- Timestamp:
- 2014-01-06T19:21:52+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r6649 r6650 43 43 import org.openstreetmap.josm.gui.widgets.EditableList; 44 44 import org.openstreetmap.josm.io.MirroredInputStream; 45 import org.openstreetmap.josm.io.UTFInputStreamReader; 45 46 import org.openstreetmap.josm.tools.CheckParameterUtil; 46 47 import org.openstreetmap.josm.tools.GBC; … … 429 430 try { 430 431 Main.info(tr("Adding {0} to tag checker", i)); 431 addMapCSS(new BufferedReader( new InputStreamReader(new MirroredInputStream(i), Utils.UTF_8)));432 addMapCSS(new BufferedReader(UTFInputStreamReader.create(new MirroredInputStream(i)))); 432 433 } catch (Exception ex) { 433 434 Main.warn(new RuntimeException(tr("Failed to add {0} to tag checker", i), ex)); -
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r6644 r6650 167 167 try { 168 168 MirroredInputStream s = new MirroredInputStream(source); 169 reader = new BufferedReader(UTFInputStreamReader.create(s , "UTF-8"));169 reader = new BufferedReader(UTFInputStreamReader.create(s)); 170 170 171 171 String okValue = null; -
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r6336 r6650 330 330 protected byte[] updateData() throws IOException { 331 331 URL u = getAttributionUrl(); 332 UTFInputStreamReader in = UTFInputStreamReader.create(Utils.openURL(u) , "utf-8");332 UTFInputStreamReader in = UTFInputStreamReader.create(Utils.openURL(u)); 333 333 String r = new Scanner(in).useDelimiter("\\A").next(); 334 334 Utils.close(in); -
trunk/src/org/openstreetmap/josm/io/GpxReader.java
r6643 r6650 430 430 */ 431 431 public GpxReader(InputStream source) throws IOException { 432 Reader utf8stream = UTFInputStreamReader.create(source , "UTF-8");432 Reader utf8stream = UTFInputStreamReader.create(source); 433 433 Reader filtered = new InvalidXmlCharacterFilter(utf8stream); 434 434 this.inputSource = new InputSource(filtered); -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r6621 r6650 589 589 progressMonitor.indeterminateSubTask(tr("Parsing OSM data...")); 590 590 591 InputStreamReader ir = UTFInputStreamReader.create(source , "UTF-8");591 InputStreamReader ir = UTFInputStreamReader.create(source); 592 592 XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(ir); 593 593 setParser(parser); -
trunk/src/org/openstreetmap/josm/io/UTFInputStreamReader.java
r6362 r6650 14 14 15 15 /** 16 * converts input stream to reader 16 * Creates a new {@link InputStreamReader} from the {@link InputStream} with UTF-8 as default encoding. 17 * @return A reader with the correct encoding. Starts to read after the BOM. 18 * @see #create(java.io.InputStream, String) 19 */ 20 public static UTFInputStreamReader create(InputStream input) throws IOException { 21 return create(input, "UTF-8"); 22 } 23 24 /** 25 * Creates a new {@link InputStreamReader} from the {@link InputStream}. 17 26 * @param defaultEncoding Used, when no BOM was recognized. Can be null. 18 27 * @return A reader with the correct encoding. Starts to read after the BOM. -
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r6643 r6650 53 53 factory.setNamespaceAware(true); 54 54 InputStream in = new MirroredInputStream(source); 55 InputSource is = new InputSource(UTFInputStreamReader.create(in , "UTF-8"));55 InputSource is = new InputSource(UTFInputStreamReader.create(in)); 56 56 factory.newSAXParser().parse(is, parser); 57 57 return parser.entries; -
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r6289 r6650 131 131 URLConnection openConnection = Utils.openHttpConnection(getCapabilitiesUrl); 132 132 InputStream inputStream = openConnection.getInputStream(); 133 BufferedReader br = new BufferedReader(UTFInputStreamReader.create(inputStream , "UTF-8"));133 BufferedReader br = new BufferedReader(UTFInputStreamReader.create(inputStream)); 134 134 String line; 135 135 StringBuilder ba = new StringBuilder();
Note:
See TracChangeset
for help on using the changeset viewer.