How can I tell when getting a file is complete? Even though I get "Done" from this method, I'll get an error if I try to read the file that I'm getting because the file isn't there in it's entirety yet.
public static void getFile(String whichFile, String whichServer){
      
       FTPClient ftp = null;
       
           try {
            
            ftp = new FTPClient();
            
            ftp.setRemoteHost(whichServer);
            
            ftp.connect();
            
             // login        
            ftp.login(userid, password);
            // set up passive ASCII transfers        
            ftp.setConnectMode(FTPConnectMode.PASV);
            ftp.setType(FTPTransferType.ASCII);
            
            
            ftp.get(whichFile,whichFile);      
               
            System.out.println("Done");
            ftp.quit();
         } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            System.out.println("IOException");
         } catch (FTPException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            System.out.println("ftp exception");
         }
           
                  
      
       
       
       
   }