|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.enterprisedt.net.ftp.FTPActiveDataSocket
public class FTPActiveDataSocket
Active data socket handling class
| Field Summary | |
|---|---|
protected java.net.Socket |
acceptedSock
The socket accepted from server. |
static java.lang.String |
cvsId
Revision control id |
protected java.net.ServerSocket |
sock
The underlying socket for Active connection. |
| Constructor Summary | |
|---|---|
protected |
FTPActiveDataSocket(java.net.ServerSocket 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. |
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). |
| 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 java.net.ServerSocket sock
protected java.net.Socket acceptedSock
| Constructor Detail |
|---|
protected FTPActiveDataSocket(java.net.ServerSocket sock)
sock - the server socket to use| Method Detail |
|---|
public void setTimeout(int millis)
throws java.io.IOException
setTimeout in interface FTPDataSocketmillis - The length of the timeout, in milliseconds
java.io.IOExceptionpublic int getLocalPort()
getLocalPort in interface FTPDataSocket
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 FTPDataSocketjava.io.IOException
public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface FTPDataSocketjava.io.IOException
public void close()
throws java.io.IOException
close in interface FTPDataSocketjava.io.IOException
public void closeChild()
throws java.io.IOException
closeChild in interface FTPDataSocketjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||