|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
com.enterprisedt.net.ftp.FileTransferOutputStream
com.enterprisedt.net.ftp.FTPOutputStream
public class FTPOutputStream
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.
| Field Summary |
|---|
| Fields inherited from class com.enterprisedt.net.ftp.FileTransferOutputStream |
|---|
closed, remoteFile, size |
| Constructor Summary | |
|---|---|
FTPOutputStream(FTPClient client,
java.lang.String remoteFile)
Constructor. |
|
FTPOutputStream(FTPClient client,
java.lang.String remoteFile,
boolean append)
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this output stream and releases any system resources associated with the stream. |
void |
setMonitor(FTPProgressMonitorEx monitor,
long monitorInterval)
The output stream uses the progress monitor currently owned by the FTP client. |
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. |
| Methods inherited from class com.enterprisedt.net.ftp.FileTransferOutputStream |
|---|
getBytesTransferred, getRemoteFile |
| Methods inherited from class java.io.OutputStream |
|---|
flush, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FTPOutputStream(FTPClient client,
java.lang.String remoteFile)
throws java.io.IOException,
FTPException
client - connected FTPClient instance (or subclass)remoteFile - name of remote file (if null, the server may
be able to generate a name
java.io.IOException
FTPException
public FTPOutputStream(FTPClient client,
java.lang.String remoteFile,
boolean append)
throws java.io.IOException,
FTPException
client - connected FTPClient instance (or subclass)remoteFile - name of remote file (if null, the server may
be able to generate a nameappend - true if appending on the server
java.io.IOException
FTPException| Method Detail |
|---|
public 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 class java.io.OutputStreamjava.io.IOException - if an I/O error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||