Returns an OutputStream through which data can be written to store a file on the server using a unique name derived from the given name. If the current file type is ASCII, the returned OutputStream will convert line separators in the file to the NETASCII format (i.e., you should not attempt to create a special OutputStream to do this). You must close the OutputStream when you finish writing to it. The OutputStream itself will take care of closing the parent data connection socket upon being closed. To finalize the file transfer you must call
completePendingCommand and check its return value to verify success.
@param remote The name on which to base the unique name given tothe remote file.
@return An OutputStream through which the remote file can be written. Ifthe data connection cannot be opened (e.g., the file does not exist), null is returned (in which case you may check the reply code to determine the exact reason for failure).
@exception FTPConnectionClosedException If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. This exception may be caught either as an IOException or independently as itself.
@exception IOException If an I/O error occurs while either sending acommand to the server or receiving a reply from the server.