我已经尝试了在这里发布的许多版本,但没有一个有效,所以我问自己。在我的代码中,我有这个公共函数。文件存在并且有一个文本,但是函数不会返回任何内容。
我做错了什么,我必须改变什么以及如何改变?
public String lesen(String dateiname) throws IOException {
FileInputStream fin = openFileInput(dateiname); // z.b. "Montag.txt"
int size;
String neuText = null;
while ((size = fin.read()) != -1) {
neuText += Character.toString((char) size);
}
return neuText;
}https://stackoverflow.com/questions/47496157
复制相似问题