0
안드로이드 폰의 sdcard에 저장된 파일에서 내용을 읽으려고합니다. 이를 위해 다음 코드를 사용안드로이드에서 파일을 읽는 중 메모리 카드에서 10kb로 제한됩니다.
public String readIt(File file) {
StringBuffer sb = new StringBuffer();
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));
String line;
while ((line = reader.readLine()) != null) {
sb.append(line + '\n');
}
reader = null;
} catch (FileNotFoundException e) {
Toast.makeText(this, "File not found", Toast.LENGTH_SHORT).show();
return null;
} catch (IOException e) {
Toast.makeText(this, "Error reading file", Toast.LENGTH_SHORT).show();
return null;
}
return sb.toString();
}
이 잠시 동안 날 귀찮게되었습니다, 그것은 삼성 휴대폰에의 인하 왜 어떤 생각? 그리고 누구든지 그것을 해결하고 그것을 읽을 때 파일 인코딩을 유지하는 방법에 대한 제안을 가지고 있습니까?