안드로이드 개발 질문/답변
(글 수 45,052)
try {
FileInputStream fis = new FileInputStream(mSdPath + "/test.txt");
/*
byte[] data = new byte[fis.available()];
while (fis.read(data) != -1) {;}
fis.close();
mEdit.setText(new String(data));*/
StringBuffer sBuffer = new StringBuffer();
DataInputStream dataIO = new DataInputStream(fis);
String strLine = null;
String [] a;
int i =0;
while( ( strLine = dataIO.readLine() ) != null ){
sBuffer.append(strLine + "\n");
a[i] = strLine;
i++;
}
dataIO.close();
fis.close();
//mEdit.setText(a,0,i);
} catch (FileNotFoundException e) {
mEdit.setText("File Not Found");
}
catch (Exception e) {;}
break;
수정어떻게 해야될까요?