Changeset 3084 in josm
- Timestamp:
- 2010-03-05T11:39:42+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
r3083 r3084 7 7 import java.io.ByteArrayInputStream; 8 8 import java.io.File; 9 import java.io.File Writer;9 import java.io.FileOutputStream; 10 10 import java.io.IOException; 11 11 import java.io.InputStream; 12 12 import java.io.InputStreamReader; 13 import java.io.OutputStreamWriter; 13 14 import java.io.PrintWriter; 14 15 import java.io.UnsupportedEncodingException; … … 121 122 connection.setRequestProperty("User-Agent",Version.getInstance().getAgentString()); 122 123 connection.setRequestProperty("Host", url.getHost()); 124 connection.setRequestProperty("Accept-Charset", "utf-8"); 123 125 } 124 126 in = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8")); … … 169 171 File cacheFile = new File(pluginDir, createSiteCacheFileName(site)); 170 172 getProgressMonitor().subTask(tr("Writing plugin list to local cache ''{0}''", cacheFile.toString())); 171 writer = new PrintWriter( 172 new FileWriter(cacheFile) 173 ); 174 writer.print(list); 173 writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(cacheFile), "utf-8")); 174 writer.write(list); 175 175 } catch(IOException e) { 176 176 // just failed to write the cache file. No big deal, but log the exception anyway
Note:
See TracChangeset
for help on using the changeset viewer.