title: FTP apache commons progress bar in java
body: <p>I'm working on a little program, which can upload a file to my FTP Server and do some other stuff with it.
  Now... It all works, i'm using the <code>org.apache.commons.net.ftp FTPClient</code> class for uploading.</p>
  
  <pre><code>ftp = new FTPClient();
  ftp.connect(hostname);
  ftp.login(username, password);
  
  ftp.setFileType(FTP.BINARY_FILE_TYPE);
  ftp.changeWorkingDirectory("/shares/public");
  int reply = ftp.getReplyCode();
  
  if (FTPReply.isPositiveCompletion(reply)) {
      addLog("Uploading...");
  } else {
      addLog("Failed connection to the server!");
  }
  
  File f1 = new File(location);
  in = new FileInputStream(
  
  ftp.storeFile(jTextField1.getText(), in);
  
  addLog("Done");
  
  ftp.logout();
  ftp.disconnect();
  </code></pre>
  
  <p>The file which should uploaded, is named in hTextField1.
  Now... How do i add a progress bar? I mean, there is no stream in ftp.storeFile... How do i handle this?</p>
  
  <p>Thanks for any help! :)</p>
  
  <p>Greetings</p>