FtpServer uses the standard, J2SE Socket class, as do most servers and clients, for network streaming of data. This is part of the J2SE class library java.net package (java.net.Socket, and java.net.ServerSocket). A good place to start looking at how the sockets are initialized and used are the (Mina) classes: org.apache.mina.transport.socket.SocketAcceptor, org.apache.mina.transport.socket.SocketSessionConfig, and org.apache.mina.transport.socket.nio.NioSocketAcceptor.
So the actual streaming of bytes and reception of the bytes for a transferred file is not handled directly in the classes of the FTPServer jars, but rather in lower level classes from the Mina jars, and the Java Standard library. At its most basic level, a transferred file is converted to a FileStream, then ultimately to an OutputStream, which passes bytes through the socket, and across the web, to a socket on the other host it is connected to. That host, be it FtpServer or a client, then reverses the process, reconstituting the file from an InputStream>>FileStream. -----Original Message----- From: Erix Yao [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 28, 2008 10:21 PM To: Develop Help for MINA Subject: Where is the code responsible for the file transfer in FTPServer? I am reading the source code of the FTPServer, But I don't know which class is responsible for the file transfer, or how the server implement the file transfer functionality? Can anybody help me?
