01.String dirPath = getFilesDir().getAbsolutePath();
02.File file = new File(dirPath);
03.
04.
05.if( !file.exists() ) {
06.file.mkdirs();
07.Toast.makeText(this, "Success", Toast.LENGTH_SHORT).show();
08.}
09.
10.
11.String testStr = "ABCDEFGHIJK...";
12.File savefile = new File(dirPath+"/test.txt");
13.try{
14.FileOutputStream fos = new FileOutputStream(savefile);
15.fos.write(testStr.getBytes());
16.fos.close();
17.Toast.makeText(this, "Save Success", Toast.LENGTH_SHORT).show();
18.} catch(IOException e){}
19.
20.
21.if ( file.listFiles().length > 0 )
22.for ( File f : file.listFiles() ) {
23.String str = f.getName();
24.Log.v(null,"fileName : "+str);
25.
26.
27.String loadPath = dirPath+"/"+str;
28.try {
29.FileInputStream fis = new FileInputStream(loadPath);
30.BufferedReader bufferReader = new BufferedReader(new InputStreamReader(fis));
31.
32.String content="", temp="";
33.while( (temp = bufferReader.readLine()) != null ) {
34.content += temp;
35.}
36.Log.v(null,""+content);
37.} catch (Exception e) {}
38.}