code: public void put(String local, String remote, FileTransferProgress progress,
  			boolean resume) throws FileNotFoundException, SftpStatusException,
  			SshException, TransferCancelledException {
  		File localPath = resolveLocalPath(local);
  
  		InputStream in = new FileInputStream(localPath);
  		// File f = new File(local);
  		long position = 0;
  
  		try {
  			SftpFileAttributes attrs = stat(remote);
  			if (attrs.isDirectory()) {
  				remote += (remote.endsWith("/") ? "" : "/")
  						+ localPath.getName();
  				attrs = stat(remote);
  			}
  
  			if (resume) {
  				if (localPath.length() <= attrs.getSize().longValue()) {
  					try {
  						in.close();
  					} catch (IOException e) {
  					}
  					throw new SftpStatusException(
  							SftpStatusException.INVALID_RESUME_STATE,
  							"The remote file size is greater than the local file");
  				}
  				try {
  					position = attrs.getSize().longValue();
  					in.skip(position);
  				} catch (IOException ex) {
  					try {
  						in.close();
  					} catch (IOException e) {
  					}
  					throw new SftpStatusException(
  							SftpStatusException.SSH_FX_NO_SUCH_FILE,
  							ex.getMessage());
  				}
  
  			}
  		} catch (SftpStatusException ex) {
  			// file didnt exist so dont need to do above
  		}
  
  		put(in, remote, progress, position);
  
  	}
docs: <p>
  Upload a file to the remote computer. If the paths provided are not
  absolute the current working directory is used.
  </p>
  
  @param local
  the path/name of the local file
  @param remote
  the path/name of the destination file
  @param progress
  @param resume
  attempt to resume after an interrupted transfer
  
  @throws SftpStatusException
  @throws SshException
  @throws TransferCancelledException
  @throws FileNotFoundException