Requests to send a file to a remote host, reads the file from an InputStream, sends the file to the remote host, and closes the connection. A local UDP socket must first be created by {@link org.apache.commons.net.DatagramSocketClient#open open()} beforeinvoking this method. This method will not close the InputStream containing the file; you must close it after the method invocation.
@param filename The name the remote server should use when creatingthe file on its file system.
@param mode The TFTP mode of the transfer (one of the MODE constants).
@param host The remote host receiving the file.
@param port The port number of the remote TFTP server.
@exception IOException If an I/O error occurs. The nature of theerror will be reported in the message.