import org.sonar.updatecenter.common.UpdateCenter;
import org.sonar.updatecenter.common.UpdateCenterDeserializer;
-import java.io.Reader;
-import java.io.StringReader;
+import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Date;
}
private UpdateCenter init() {
- Reader reader = null;
+ InputStream input = null;
try {
String content = uriReader.readString(uri, Charsets.UTF_8);
java.util.Properties properties = new java.util.Properties();
- reader = new StringReader(content);
- properties.load(reader);
+ input = IOUtils.toInputStream(content, Charsets.UTF_8.name());
+ properties.load(input);
return UpdateCenterDeserializer.fromProperties(properties);
return null;
} finally {
- IOUtils.closeQuietly(reader);
+ IOUtils.closeQuietly(input);
}
}
}