| java.lang.Object com.enterprisedt.net.ftp.FTPActiveDataSocket
FTPActiveDataSocket | public class FTPActiveDataSocket implements FTPDataSocket(Code) | | Active data socket handling class
author: Bruce Blackshaw version: $Revision: 1.6 $ |
Method Summary | |
protected void | acceptConnection() Waits for a connection from the server and then sets the timeout when the
connection is made. | public void | close() | public void | closeChild() | public InputStream | getInputStream() If active mode, accepts the FTP server's connection - in PASV, we are
already connected. | public int | getLocalPort() Returns the local port to which this socket is bound. | public OutputStream | getOutputStream() If active mode, accepts the FTP server's connection - in PASV, we are
already connected. | public void | setTimeout(int millis) Set the TCP timeout on the underlying data socket(s). |
acceptedSock | protected Socket acceptedSock(Code) | | The socket accepted from server.
|
FTPActiveDataSocket | protected FTPActiveDataSocket(ServerSocket sock)(Code) | | Constructor
Parameters: sock - the server socket to use |
acceptConnection | protected void acceptConnection() throws IOException(Code) | | Waits for a connection from the server and then sets the timeout when the
connection is made.
throws: IOException - There was an error while waiting for or accepting aconnection from the server. |
getInputStream | public InputStream getInputStream() throws IOException(Code) | | If active mode, accepts the FTP server's connection - in PASV, we are
already connected. Then gets the input stream of the connection
input stream for underlying socket. |
getLocalPort | public int getLocalPort()(Code) | | Returns the local port to which this socket is bound.
the local port number to which this socket is bound |
getOutputStream | public OutputStream getOutputStream() throws IOException(Code) | | If active mode, accepts the FTP server's connection - in PASV, we are
already connected. Then gets the output stream of the connection
output stream for underlying socket. |
setTimeout | public void setTimeout(int millis) throws IOException(Code) | | Set the TCP timeout on the underlying data socket(s).
If a timeout is set, then any operation which takes longer than the
timeout value will be killed with a java.io.InterruptedException.
Parameters: millis - The length of the timeout, in milliseconds |
|
|