12/01/14 12:42:54.34
SDカード上のバイナリファイル読み込みについて質問があります。
ファイルパスは下記で生成して、
String filepath = Environment.getExternalStorageDirectory().getAbsolutePath() + "testfolder/" + "sample.bin";
で、↓を実行すると、例外「File /mnt/sdcard/testfolder/sample.bin contains a path separator」が発生します。
context.openFileInput( filepath );
なので、openFileInput関数はやめて
File file = new File( filepath );
とやってから
FileInputStream fis=new FileInputStream(file);
とやると、通常に読むことができました。 (filepathは同じ値です。)
そこで質問なのですが
context.openFileInput( filepath );
に渡すfilepathの内容の何がいけなかったのでしょうか? path separatorって 「/」 のことですよね・・?