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 FTPDataSocketmillis - The length of the timeout, in millisecondsjava.io.IOExceptionpublic int getLocalPort()
getLocalPort in interface FTPDataSocketpublic java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in interface FTPDataSocketjava.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface FTPDataSocketjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface FTPDataSocketjava.io.IOExceptionpublic void closeChild()
throws java.io.IOException
closeChild in interface FTPDataSocketjava.io.IOException