public void append(File file,FTPDataTransferListener listener) throws IllegalStateException, FileNotFoundException, IOException, FTPIllegalReplyException, FTPException, FTPDataTransferException, FTPAbortedException {
  if (!file.exists()) {
    throw new FileNotFoundException(file.getAbsolutePath());
  }
  InputStream inputStream=null;
  try {
    inputStream=new FileInputStream(file);
  }
 catch (  IOException e) {
    throw new FTPDataTransferException(e);
  }
  try {
    append(file.getName(),inputStream,0,listener);
  }
 catch (  IllegalStateException e) {
    throw e;
  }
catch (  IOException e) {
    throw e;
  }
catch (  FTPIllegalReplyException e) {
    throw e;
  }
catch (  FTPException e) {
    throw e;
  }
catch (  FTPDataTransferException e) {
    throw e;
  }
catch (  FTPAbortedException e) {
    throw e;
  }
 finally {
    if (inputStream != null) {
      try {
        inputStream.close();
      }
 catch (      Throwable t) {
        ;
      }
    }
  }
}

public void append ( File file , FTPDataTransferListener listener ) throws IllegalStateException , FileNotFoundException , IOException , FTPIllegalReplyException , FTPException , FTPDataTransferException , FTPAbortedException { if ( ! file . exists ( ) ) { throw new FileNotFoundException ( file . getAbsolutePath ( ) ) ; } InputStream inputStream = null ; try { inputStream = new FileInputStream ( file ) ; } catch ( IOException e ) { throw new FTPDataTransferException ( e ) ; } try { append ( file . getName ( ) , inputStream , 0 , listener ) ; } catch ( IllegalStateException e ) { throw e ; } catch ( IOException e ) { throw e ; } catch ( FTPIllegalReplyException e ) { throw e ; } catch ( FTPException e ) { throw e ; } catch ( FTPDataTransferException e ) { throw e ; } catch ( FTPAbortedException e ) { throw e ; } finally { if ( inputStream != null ) { try { inputStream . close ( ) ; } catch ( Throwable t ) { ; } } } }
this method uploads a file to the remote server . calling this method blocks the current thread until the operation is completed . the operation could be interrupted by another thread calling abortcurrentdatatransfer ( ) . the method will break with a ftpabortedexception .
