Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.6k views
in Java FTP by (220 points)
Hello All -

I am using version 2.0.3 of the edtFTPj/Free version of the FTP client and it is working great. My question concerns the callback method bytesTransferred of the EventListener interface. The callback method expects 3 arguments; a String connection id, a String fileName, and a long count.

What is occurring is that the fileName value is 1 when the bytesTransferred method is called.

The callback methods of uploadStarted and uploadCompleted contain the correct fileName value in their invocation so their aren't any issues there.

Thanks
Nick

2 Answers

0 votes
by (220 points)
I quickly dug through the code and in the com.enterprisedt.net.ftp.internal.EventAggregator.java the bytesTransferred(int count) method within the class calls the EventListener.bytesTransferred with the following code:

public void bytesTransferred(long count) {
        if (eventListener != null)
            eventListener.bytesTransferred(remoteFile, connId, count);        
    }


The javadoc for the EventListener.bytesTransferred method are:

bytesTransferred(java.lang.String connId, java.lang.String remoteFilename, long count) 


The parameters in the EventAggregator.java simply needs to change to follow the pattern of the other callback methods in EventListener to passing in the connId first then remoteFile and finally count.

Will this be fixed in the next release?

Thanks
Nick
0 votes
by (51.6k points)
Thanks a lot for pointing it out. We've fixed it in the source and will include the fix with the next release.

- Hans (EnterpriseDT)

Categories

...