public class FTPPassiveDataSocket extends java.lang.Object implements FTPDataSocket
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cvsId
Revision control id
|
Constructor and Description |
---|
FTPPassiveDataSocket(java.net.Socket sock)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes underlying socket
|
void |
closeChild()
Does nothing in passive mode
|
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 control socket.
|
public static final java.lang.String cvsId
public FTPPassiveDataSocket(java.net.Socket sock)
sock
- client 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