我正在开发一个应用程序。该应用程序需要获取简单 .php URL 的内容,并将其保存为字符串。问题是它是一个很长的字符串(Very LONG),它只有一半。以这个链接为例:
http
://thuum.org/download-dev-notes-web.php
用这段代码
URL notes = new URL("http://thuum.org/download-dev-notes-web.php")
BufferedReader in = new BufferedReader(new InputStreamReader(notes.openStream()));
String t = "";
while ((inputLine = in.readLine()) != null)
t = inputLine;
fOut = openFileOutput("notes", MODE_PRIVATE);
fOut.write(t.getBytes());
// Added This \/ to see it's length when divided, and it is not nearly as much as it should be
System.out.println(t.split("\\@").length);
有人可以告诉我如何将其下载到字符串中,并将其保存到内部存储中而不会被剪切?一些为什么它看起来只得到最后 x 位的原因......