title: Cannot connect to FTP on Gingerbread
body: <p>I recently noticed that when trying to run my application on the Gingerbread emulation, that FTP broke. I am currently using the apache commons external library for FTP support, but for some reason it works on every other Android OS except 2.3 (Gingerbread)</p>
  
  <p>Here is my FTP code</p>
  
  <pre><code>FTPClient ftp = new FTPClient();
  ftp.connect(SERVER);
  ftp.login("anonymous", "anonymous");
  ftp.setFileType(FTP.BINARY_FILE_TYPE);
  ftp.enterLocalPassiveMode();
  
  InputStream is = ftp.retrieveFileStream("file.txt");
  byte[] data = new byte[1024];
  
  fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);
  int x = 0;
  while((x=is.read(data,0,1024))&gt;=0){
      fos.write(data,0,x);
  }
  fos.flush();
  fos.close();
  ftp.logout();
  ftp.disconnect();
  </code></pre>
  
  <p>As I said, this is tested and works on 1.6, 2.1 and 2.2, but not 2.3. I've tried all day to figure out why and how to fix it but I can't find any solution.</p>
  
  <p>I was therefore wondering if anybody have experience with FTP and Gingerbread and if you might be so nice to guide me in the right direction.</p>
  
  <p>Thanks.</p>