public class SSHFTPOutputStream extends FileTransferOutputStream
closed, remoteFile, size| Constructor and Description |
|---|
SSHFTPOutputStream(SSHFTPClient client,
java.lang.String remoteFile)
Constructor.
|
SSHFTPOutputStream(SSHFTPClient client,
java.lang.String remoteFile,
boolean append)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this output stream and releases any system resources associated
with the stream.
|
java.lang.String |
getRemoteFile()
Get the name of the remote file
|
void |
setMonitor(FTPProgressMonitorEx monitor,
long monitorInterval)
The output stream uses the progress monitor currently owned by the SSHFTPClient.
|
void |
write(byte[] b,
int off,
int len)
Writes
len bytes from the specified byte array
starting at offset off to this output stream. |
void |
write(int b)
Writes
b.length bytes from the specified byte array
to this output stream. |
getBytesTransferredpublic SSHFTPOutputStream(SSHFTPClient client, java.lang.String remoteFile) throws java.io.IOException, FTPException
client - connected SSHFTPClient instanceremoteFile - name of remote filejava.io.IOExceptionFTPExceptionpublic SSHFTPOutputStream(SSHFTPClient client, java.lang.String remoteFile, boolean append) throws java.io.IOException, FTPException
client - connected SSHFTPClient instanceremoteFile - name of remote fileappend - true if appending on the serverjava.io.IOExceptionFTPExceptionpublic java.lang.String getRemoteFile()
getRemoteFile in class FileTransferOutputStreampublic void setMonitor(FTPProgressMonitorEx monitor, long monitorInterval)
monitor - progress monitor referencemonitorInterval - public void write(int b)
throws java.io.IOException
b.length bytes from the specified byte array
to this output stream.write in class java.io.OutputStreamb - the data.java.io.IOException - if an I/O error occurs.public void write(byte[] b,
int off,
int len)
throws java.io.IOException
len bytes from the specified byte array
starting at offset off to this output stream.write in class java.io.OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.java.io.IOException - if an I/O error occurs.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs.Copyright © 2001-2014 Enterprise Distributed Technologies Ltd. All Rights Reserved.