Package org.globus.io.streams
Class FTPOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.globus.io.streams.GlobusOutputStream
-
- org.globus.io.streams.FTPOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Direct Known Subclasses:
GridFTPOutputStream
public class FTPOutputStream extends GlobusOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description protected FTPClientftpprotected OutputStreamoutputprotected TransferStatestate
-
Constructor Summary
Constructors Modifier Constructor Description protectedFTPOutputStream()FTPOutputStream(String host, int port, String user, String pwd, String file, boolean append)FTPOutputStream(String host, int port, String user, String pwd, String file, boolean append, boolean passive, int type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Aborts transfer.voidclose()voidflush()protected voidput(boolean passive, int type, String remoteFile, boolean append)voidwrite(byte[] msg)voidwrite(byte[] msg, int from, int length)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Field Detail
-
output
protected OutputStream output
-
ftp
protected FTPClient ftp
-
state
protected TransferState state
-
-
Constructor Detail
-
FTPOutputStream
protected FTPOutputStream()
-
FTPOutputStream
public FTPOutputStream(String host, int port, String user, String pwd, String file, boolean append) throws IOException, FTPException
- Throws:
IOExceptionFTPException
-
FTPOutputStream
public FTPOutputStream(String host, int port, String user, String pwd, String file, boolean append, boolean passive, int type) throws IOException, FTPException
- Throws:
IOExceptionFTPException
-
-
Method Detail
-
abort
public void abort()
Description copied from class:GlobusOutputStreamAborts transfer. Usually makes sure to release all resources (sockets, file descriptors)
Does nothing by default.- Overrides:
abortin classGlobusOutputStream
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
put
protected void put(boolean passive, int type, String remoteFile, boolean append) throws IOException, FTPException- Throws:
IOExceptionFTPException
-
write
public void write(byte[] msg) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] msg, int from, int length) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(int b) throws IOException- Overrides:
writein classGlobusOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
-