You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Andrew Elcock <an...@elcock.org> on 2005/08/08 11:07:28 UTC

Commons NET

I am using much commons code and find it to be excellent and easy to use 
for the main, but have hit a barrier with the NET package.

I am using the net code to upload files to an FTP server. Using the 
examples and documentation I have a system that can connect, create 
folders etc, but fails miserably to actually upload data. Is there a 
common error that I have fallen in to the trap of without luck from 
archives, or is it unique to me? I can send the code, but did not want 
to pollute the list straight off.

Thanks,
Andrew

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Commons NET, FTPClient

Posted by Karel Tejnora <ka...@tejnora.cz>.
Hi, 
    I would like to extend FTPClient from Commons/Net to support java.nio.*
First step I did is to implement custom SocketFactory. There are not any 
problems.
Every method returns java.net.Socket or java.net.ServerSocket as 
SocketChannel.socket()
and ServerSocketChannel.socket().
But problems came in FTPClient class, where I needed refactorize 
_openDataConnection_().
The __dataTimeout has only setter not getter.
_openDataConnection_ uses private __pasiveHost, __pasivePort through 
private __parsePassiveModeReply()
_relyLines aren't visible to.
So I added public int getDataTimeOut(), public  String getPassiveHost(), 
public int getPassiveHost(), protected _popReplyLines() and changed 
private __parsePassiveModeReply() to protected _parsePassiveReply().
I don't contribute patch yet, because I have few questions.
do you like it to change this things?
And Im new to svn
I took these steps
svn checkout 
http://svn.apache.org/repos/asf/jakarta/commons/proper/net/trunk/
but the build generates  commons-net-1.3.0-dev.jar
Whis url should I take to generate proper diff?

Thx.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org