テキスト ファイルを FTP 経由でサーバーにアップロードしようとしています。テキスト ファイルは data/data/my package/files にあります (DDMS にチェックインしました)。LogCat で filenotfoundexception が発生しています。
これが私のコードです:
FTPClient client = new FTPClient();
FileInputStream fis = null;
try {
client.connect("82.163.99.80");
client.enterLocalPassiveMode();
client.login("user", "password");
//
// Create an InputStream of the file to be uploaded
//
String filename = "sdcardstats.txt";
fis = new FileInputStream(filename);
//
// Store file to server
//
client.storeFile(filename, fis);
client.logout();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (fis != null) {
fis.close();
}
client.disconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
誰でも助けてもらえますか?