I have an InputStream coming from the internet, using this code :
URL url = new URL(sharedPreferences.getString("profile" + drawer.getCurrentSelectedPosition() + "Url", ""));
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setDoInput(true);
connection.connect();
BufferedInputStream inputStream = new BufferedInputStream(connection.getInputStream());
What i want is to convert the &
to &
in order for the XML to be valid and not cause an error when parsing.
I'd also like not to convert the inputstream to string (and use String.replaceAll()) in order to be more memory efficient.
Is there a way ? Thanks.