public class FTPActiveDataSocket extends java.lang.Object implements FTPDataSocket
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cvsId
Revision control id
|
Constructor and Description |
---|
FTPActiveDataSocket(java.net.ServerSocket sock)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes underlying sockets
|
void |
closeChild()
Closes child socket
|
java.io.InputStream |
getInputStream()
If active mode, accepts the FTP server's connection - in PASV, we are
already connected.
|
int |
getLocalPort()
Returns the local port to which this socket is bound.
|
java.io.OutputStream |
getOutputStream()
If active mode, accepts the FTP server's connection - in PASV, we are
already connected.
|
void |
setTimeout(int millis)
Set the TCP timeout on the underlying data socket(s).
|
public FTPActiveDataSocket(java.net.ServerSocket sock)
sock
- the server socket to usepublic void setTimeout(int millis) throws java.io.IOException
setTimeout
in interface FTPDataSocket
millis
- The length of the timeout, in millisecondsjava.io.IOException
public int getLocalPort()
getLocalPort
in interface FTPDataSocket
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface FTPDataSocket
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface FTPDataSocket
java.io.IOException
public void close() throws java.io.IOException
close
in interface FTPDataSocket
java.io.IOException
public void closeChild() throws java.io.IOException
closeChild
in interface FTPDataSocket
java.io.IOException