On Sun, Aug 24, 2008 at 12:41 PM, Mobinor <[EMAIL PROTECTED]> wrote: > As part of embedding Apache Mina FTP server, we need access to the stream > from the ftp connection from within our application. > > We have decided to implement our own STORE command, and then catching the > data stream from the DataConnection. > > Our issue is that the DataConnection only offers an outputstream( > transferFromClient(OutputStream out)). I have looked at the implementation > of the interface (org.apache.ftpserver.IODataConnection), and see there the > is a private method getDataInputStream. We would really like to get access > to this method from the DataConnection interface, or a similar method to get > direct access to the inputstream.
Yes, the reasoning behind the design of the interface is that I would like to do a MINA based implementation of the data connection. That would mean that we would not have an input stream at all. That means that even if we made getDataInputStream (or similar) public, you would be dependent on the internal implementation, would that be sufficient for you? Be aware that if we do get around to making a MINA based data connection and it turns out to work better than the current implementation, we're likely to drop IoDataConnection. Could you also describe why you need direct access to the input stream rather than providing an output stream for the data connection to read from? /niklas
