Nesto mi ne ide!!! Ima li neko pojma kako, sta???
izostavio sam metode open()/close().
Code:
public boolean Download(String srcFilePath, String desFilePath)
{
boolean status = false;
try {
FileOutputStream desFileStream = new FileOutputStream(desFilePath);;
status = _ftpClient.retrieveFile(srcFilePath, desFileStream);
desFileStream.close();
return status;
} catch (Exception e) {
}
return status;
}
public boolean Download(String srcFilePath, String desFilePath)
{
boolean status = false;
try {
FileOutputStream desFileStream = new FileOutputStream(desFilePath);;
status = _ftpClient.retrieveFile(srcFilePath, desFileStream);
desFileStream.close();
return status;
} catch (Exception e) {
}
return status;
}
Code:
try{
FTPFactory ftpDow=new FTPFactory();
ftpDow.Connect("IP adresa/host name", "user", "password",port?);
ftpDow.Download("/httpdocs/SLIKE/000001.JPG","SDCARD/komerc/slike");
ftpDow.Disconnect();
} catch (IOException e) {
// TODO Auto-generated catch block
Log.v("PORUKA: ", e.toString());
}
try{
FTPFactory ftpDow=new FTPFactory();
ftpDow.Connect("IP adresa/host name", "user", "password",port?);
ftpDow.Download("/httpdocs/SLIKE/000001.JPG","SDCARD/komerc/slike");
ftpDow.Disconnect();
} catch (IOException e) {
// TODO Auto-generated catch block
Log.v("PORUKA: ", e.toString());
}
?????