申し訳ありません。いたらない情報までのせておりましたので
再度投稿いたします。
} catch (Exception e ) {
e.printStackTrace();
}
}
public void execute( SmbFile f , String path) {
// ここにやりたい処理を書く
//System.out.println( f.getPath() );
try {
//取得元ファイル取得
SmbFileInputStream bfIs = new SmbFileInputStream(f.getPath());
InputStreamReader bfIn = new InputStreamReader(bfIs,"UTF-8");
BufferedReader brInFile = new BufferedReader(bfIn);
//ここまでファイル読み込みサンプル
// 取得先ファイル生成
FileOutputStream outIs = new FileOutputStream(Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + path + f.getName());
OutputStreamWriter outIn = new OutputStreamWriter(outIs,"UTF-8");
PrintWriter pwOutFile = new PrintWriter(new BufferedWriter(outIn));
// 読み込み処理
String strBuff;
while((strBuff = brInFile.readLine()) != null) {
pwOutFile.println(strBuff);
}
// クローズ処理
brInFile.close();
pwOutFile.close();
} catch (Exception e ) {
e.printStackTrace();
}
}
@Override
protected Long doInBackground(String... params) {
Log.d(TAG, "doInBackground - " + params[0]);
try {
kijun = "smb://" + AsyncTest.name1 + ":" + AsyncTest.password1 + "@IPアドレス/F/";
SmbFile file = new SmbFile("smb://" + AsyncTest.name1 + ":" + AsyncTest.password1 + "@IPアドレス/F/");
mame = file;
final SmbFile [] files = file.listFiles();
filenames = file.list();
readFolder(file);
for (SmbFile f : files) {
String smbPath = f.getPath(); // SMB URL。※※アカウント情報含んだSMB URLを指定した場合、それらも含まれるので表示には注意※※
System.out.println(smbPath);
}
} catch (Exception e ) {
e.printStackTrace();
}
return 123L;
}
2014年2月7日金曜日 11時07分42秒 UTC+9 ion1031: