|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.enterprisedt.net.ftp.pro.ProFTPActiveDataSocket
public class ProFTPActiveDataSocket
Active data socket handling class
| Field Summary | |
|---|---|
protected StreamSocket |
acceptedSock
The socket accepted from server. |
static java.lang.String |
cvsId
Revision control id |
protected int |
sendBufferSize
|
protected ProxyServerSocket |
sock
The underlying socket for Active connection. |
| Constructor Summary | |
|---|---|
ProFTPActiveDataSocket(ProxyServerSocket sock)
Constructor |
|
| Method Summary | |
|---|---|
protected void |
acceptConnection()
Waits for a connection from the server and then sets the timeout when the connection is made. |
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. |
java.net.InetAddress |
getLocalAddress()
Returns the local address to which this socket is bound. |
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 |
setReceiveBufferSize(int size)
Set the size of the data socket's receive buffer. |
void |
setSendBufferSize(int size)
Set the size of the data socket's send buffer. |
void |
setTimeout(int millis)
Set the TCP timeout on the underlying data socket(s). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String cvsId
protected ProxyServerSocket sock
protected StreamSocket acceptedSock
protected int sendBufferSize
| Constructor Detail |
|---|
public ProFTPActiveDataSocket(ProxyServerSocket sock)
sock - the server socket to use| Method Detail |
|---|
public void setTimeout(int millis)
throws java.io.IOException
setTimeout in interface com.enterprisedt.net.ftp.internal.FTPDataSocketmillis - The length of the timeout, in milliseconds
java.io.IOException
public void setReceiveBufferSize(int size)
throws java.io.IOException
setReceiveBufferSize in interface com.enterprisedt.net.ftp.internal.FTPDataSocketsize - must be > 0
java.io.IOException
public void setSendBufferSize(int size)
throws java.io.IOException
setSendBufferSize in interface com.enterprisedt.net.ftp.internal.FTPDataSocketsize - must be > 0
java.io.IOExceptionpublic int getLocalPort()
getLocalPort in interface com.enterprisedt.net.ftp.internal.FTPDataSocketpublic java.net.InetAddress getLocalAddress()
getLocalAddress in interface com.enterprisedt.net.ftp.internal.FTPDataSocketjava.io.IOException
protected void acceptConnection()
throws java.io.IOException
java.io.IOException - There was an error while waiting for or accepting a
connection from the server.
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in interface com.enterprisedt.net.ftp.internal.FTPDataSocketjava.io.IOException
public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface com.enterprisedt.net.ftp.internal.FTPDataSocketjava.io.IOException
public void close()
throws java.io.IOException
close in interface com.enterprisedt.net.ftp.internal.FTPDataSocketjava.io.IOException
public void closeChild()
throws java.io.IOException
closeChild in interface com.enterprisedt.net.ftp.internal.FTPDataSocketjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||