|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.radinks.net.FTPConnection.DataConnection
Inner class that acts as an abstraction layer for Socket
and ServerSocket.
Unfortunately Socket and SeverSocket do not share any ancestors. Therefore we need to create our adapter class that encloses both a ServerSocket and a Socket.
Though it's possible to obtain a Socket instance from ServerSocket by calling the accept method() it's not suitable for our work because the thread would immidiately become blocked.
| Constructor Summary | |
FTPConnection.DataConnection()
|
|
| Method Summary | |
java.io.InputStream |
getInputStream()
Follows the adapter pattern, returns the input stream of the server socket or client socket. |
java.io.OutputStream |
getOutputStream()
returns the output stream of the client or server socket depending on whether the active or passive mode is in effect. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FTPConnection.DataConnection()
| Method Detail |
public java.io.InputStream getInputStream()
throws java.io.IOException
InputStream for the data connection.
java.io.IOException
public java.io.OutputStream getOutputStream()
throws java.io.IOException
OutputStream for the data connection.
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Rad Inks FTP library
Copyright (c) 2003,2004 Rad Inks (Pvt) Ltd.