Hi ,all
  when I run those code,

   FTPClient ftpClient = new FTPClient();
        ftpClient.connect(InetAddress.getByName(server));
        ftpClient.login(username, password);
        Log.d("FTP",ftpClient.getReplyString());
        ftpClient.changeWorkingDirectory(serverRoad);
        ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
        BufferedInputStream buffIn=null;
         buffIn=new BufferedInputStream(new FileInputStream
(fileRoad));
        ftpClient.storeFile(newFileName, buffIn);
        buffIn.close();
        ftpClient.logout();
        ftpClient.disconnect();

it works fine in the common java env. and the file is upload to the
ftp server. However, When it run in android, It thrown  exception:
WARN/System.err(929):
org.apache.commons.net.ftp.FTPConnectionClosedException: Connection
closed without indication.

Do someone have a successful ftp upload code, thank very much if
share.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to