以下に示すように、CSV ファイルを作成した後にリンクを返す Tornado Web サービスがあります。
http://10.0.2.2:8000/uploads/16165159GyjFImAYZssLEmn/16165159GyjFImAYZssLEmn.csv
また、この URL を Android アプリケーション内に正常に出力しました。私の質問は、上記の URL を使用してこのファイルのデータを解析する方法です。私は多くの方法を試しましたが、それを成し遂げることができませんでした。誰かがこの問題を解決するのを手伝ってくれませんか。私がこれまでに持っているコードは次のとおりです。
また、この投稿も参照しましたが、まだ成功していません。
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];
お時間をいただきありがとうございます