Revision 8752 trunk/frameworks/_fwAndami/src/com/iver/andami/Launcher.java
Launcher.java | ||
---|---|---|
47 | 47 |
import java.awt.KeyboardFocusManager; |
48 | 48 |
import java.awt.Point; |
49 | 49 |
import java.awt.Toolkit; |
50 |
import java.io.BufferedInputStream; |
|
51 |
import java.io.BufferedOutputStream; |
|
52 | 50 |
import java.io.BufferedReader; |
53 | 51 |
import java.io.File; |
54 | 52 |
import java.io.FileFilter; |
... | ... | |
61 | 59 |
import java.io.IOException; |
62 | 60 |
import java.io.InputStream; |
63 | 61 |
import java.io.InputStreamReader; |
62 |
import java.io.Reader; |
|
64 | 63 |
import java.lang.reflect.InvocationTargetException; |
65 | 64 |
import java.net.MalformedURLException; |
66 | 65 |
import java.net.URL; |
... | ... | |
1129 | 1128 |
File.separator + "config.xml"); |
1130 | 1129 |
|
1131 | 1130 |
try { |
1132 |
FileReader xml = new FileReader(configXml); |
|
1131 |
FileInputStream is = new FileInputStream(configXml); |
|
1132 |
Reader xml = com.iver.utiles.xml.XMLEncodingUtils.getReader(is); |
|
1133 |
if (xml==null) { |
|
1134 |
// the encoding was not correctly detected, use system default |
|
1135 |
xml = new FileReader(configXml); |
|
1136 |
} |
|
1137 |
else { |
|
1138 |
// use a buffered reader to improve performance |
|
1139 |
xml = new BufferedReader(xml); |
|
1140 |
} |
|
1133 | 1141 |
PluginConfig pConfig = (PluginConfig) PluginConfig.unmarshal(xml); |
1134 | 1142 |
pluginsConfig.put(pluginDirs[i].getName(), pConfig); |
1135 | 1143 |
} catch (FileNotFoundException e) { |
Also available in: Unified diff