public interface FtpConnection
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes open connection.
|
java.lang.String |
getHost()
Returns current host name.
|
java.io.InputStream |
getInputStream()
Returns connection input stream.
|
java.io.OutputStream |
getOutputStream()
Returns connection output stream.
|
boolean |
isOpen()
Checks if connection is open.
|
void |
openIncoming(int timeout,
int linger)
Opens incoming connection.
|
void |
openOutgoing(java.lang.String host,
int port,
int timeout,
boolean keepAlive,
boolean tcpNoDelay,
int linger,
java.lang.String proxyHost,
int proxyPort,
java.lang.String proxyUserId,
java.lang.String proxyPassword,
java.lang.String proxyType)
Opens outgoing connection.
|
void |
openOutgoing(java.lang.String host,
int port,
int timeout,
int linger,
boolean keepAlive,
boolean tcpNoDelay)
Opens outgoing connection.
|
void |
prepareIncoming(com.jscape.inet.util.ServerSocketUtil.PortRange range,
int timeout)
Prepares incoming connection.
|
void |
setCompression(boolean compression)
Sets whether the sockets streams will be wrapped into Deflatered
and Inflatered streams.
|
void |
setReceiveBufferSize(int receiveBufferSize)
Sets the receive buffer size option of the ftp connection.
|
void |
setSendBufferSize(int sendBufferSize)
Sets the send buffer size option of the ftp connection.
|
void prepareIncoming(com.jscape.inet.util.ServerSocketUtil.PortRange range,
int timeout)
throws FtpException
range - data port rangetimeout - connection timeout.FtpException - if an I/O error occurs.void openIncoming(int timeout,
int linger)
throws FtpException
timeout - connection timeout.FtpException - if an I/O error occurs.void openOutgoing(java.lang.String host,
int port,
int timeout,
int linger,
boolean keepAlive,
boolean tcpNoDelay)
throws FtpException
host - host to connectport - port to connecttimeout - connection timeoutFtpException - an I/O error occurs.void openOutgoing(java.lang.String host,
int port,
int timeout,
boolean keepAlive,
boolean tcpNoDelay,
int linger,
java.lang.String proxyHost,
int proxyPort,
java.lang.String proxyUserId,
java.lang.String proxyPassword,
java.lang.String proxyType)
throws FtpException
host - host to connectport - port to connecttimeout - connection timeoutkeepAlive - keep alivelinger - how long to linger forproxyHost - Proxy host serverproxyPort - Proxy portproxyUserId - Proxy user nameproxyPassword - Proxy user passwordproxyType - Valid proxy type: HTTP, SOCKS5FtpException - if an I/O error occurs.void close()
boolean isOpen()
true if connection is open.java.io.InputStream getInputStream()
throws FtpException
FtpException - an I/O error occurs.java.io.OutputStream getOutputStream()
throws FtpException
FtpException - an I/O error occurs.java.lang.String getHost()
void setCompression(boolean compression)
void setSendBufferSize(int sendBufferSize)
sendBufferSize - Send buffer size.void setReceiveBufferSize(int receiveBufferSize)
receiveBufferSize - Receive buffer size.Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved