I have Tornado web service which returns a link after creating a CSV file as shown below.
http://10.0.2.2:8000/uploads/16165159GyjFImAYZssLEmn/16165159GyjFImAYZssLEmn.csv
Also I have outputted this URL within the Android application successfully. My question is how to parse the data of this file using the URL shown above. I have tried numerous ways and could not get it done. Can some one please help me to solve this problem. The code I have so far is as follows.
Also I have referred to this post as well, however still no success.
HttpClient httpclient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(modifyURL);
HttpResponse httpResponse = httpclient.execute(httpPost);
responseEntity = httpResponse.getEntity();
transformedImageURL = EntityUtils.toString(responseEntity);
URL url = new URL(transformedImageURL);
InputStream stream = url.openStream();
BufferedInputStream bis = new BufferedInputStream(stream);
ByteArrayBuffer baf = new ByteArrayBuffer(200);
nt current = 0;
while((current - bis.read()) != -1){
baf.append((byte) current);
}
String stockText = new String(baf.toByteArray());
String[] tokens = stockText.split(",");
String testData = tokens[0];
Thank you for your time