| com.enterprisedt.net.ftp.FileTransferOutputStream com.enterprisedt.net.ftp.FTPOutputStream
FTPOutputStream | public class FTPOutputStream extends FileTransferOutputStream (Code) | | Represents an output stream that writes to an FTP server, permitting
the user to upload a file by writing to the stream. It can only be used
for one upload, i.e. after the stream is closed it cannot be reopened.
author: Bruce Blackshaw version: $Revision: 1.1 $ |
Method Summary | |
public void | close() Closes this output stream and releases any system resources associated
with the stream. | public void | setMonitor(FTPProgressMonitorEx monitor, long monitorInterval) The output stream uses the progress monitor currently owned by the FTP client. | public void | write(int b) Writes b.length bytes from the specified byte array
to this output stream. | public void | write(byte b, int off, int len) Writes len bytes from the specified byte array
starting at offset off to this output stream. |
FTPOutputStream | public FTPOutputStream(FTPClient client, String remoteFile) throws IOException, FTPException(Code) | | Constructor. A connected FTPClient instance must be supplied. This sets up the
download.
Parameters: client - connected FTPClient instance (or subclass) Parameters: remoteFile - name of remote file (if null, the server may be able to generate a name throws: IOException - throws: FTPException - |
FTPOutputStream | public FTPOutputStream(FTPClient client, String remoteFile, boolean append) throws IOException, FTPException(Code) | | Constructor. A connected FTPClient instance must be supplied. This sets up the
download.
Parameters: client - connected FTPClient instance (or subclass) Parameters: remoteFile - name of remote file (if null, the server may be able to generate a name Parameters: append - true if appending on the server throws: IOException - throws: FTPException - |
close | public void close() throws IOException(Code) | | Closes this output stream and releases any system resources associated
with the stream. This must be called before any other operations
are initiated on the FTPClient.
exception: IOException - if an I/O error occurs. |
setMonitor | public void setMonitor(FTPProgressMonitorEx monitor, long monitorInterval)(Code) | | The output stream uses the progress monitor currently owned by the FTP client.
This method allows a different progress monitor to be passed in, or for the
monitor interval to be altered.
Parameters: monitor - progress monitor reference Parameters: monitorInterval - |
write | public void write(int b) throws IOException(Code) | | Writes b.length bytes from the specified byte array
to this output stream.
Parameters: b - the data. exception: IOException - if an I/O error occurs. |
write | public void write(byte b, int off, int len) throws IOException(Code) | | Writes len bytes from the specified byte array
starting at offset off to this output stream.
Parameters: b - the data. Parameters: off - the start offset in the data. Parameters: len - the number of bytes to write. exception: IOException - if an I/O error occurs. |
Methods inherited from com.enterprisedt.net.ftp.FileTransferOutputStream | public String getRemoteFile()(Code)(Java Doc)
|
|
|