}
}
public void put(File source, String destination, boolean overwrite) throws IOException {
fireTransferInitiated(getResource(destination), TransferEvent.REQUEST_PUT);
ChannelSftp c = getSftpChannel(destination);
try {
if (!overwrite && checkExistence(destination, c))
throw new IOException("destination file exists and overwrite == true");
if (destination.indexOf('/') != -1) {
mkdirs(destination.substring(0, destination.lastIndexOf('/')), c);
}
c.put(source.getAbsolutePath(), destination, new MyProgressMonitor());
} catch (SftpException e) {
IOException ex = new IOException(e.getMessage());
ex.initCause(e);
throw ex;
}