commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35304] - FTPClient: No reply codes available
Date Fri, 10 Jun 2005 00:02:04 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35304>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35304





------- Additional Comments From scohen@apache.org  2005-06-10 02:02 -------
I'll leave it to Daniel Savarese to respond to your comments on the design
decisions he made when this code was being written eight years ago, if he so
chooses.  I will merely point you toward some resources which are currently
available that you may not have known about, to help you get around your
specific problem, whatever it may be.

You don't have to call the low-level commands directly to get the benefit of the
diagnostics they do provide.  In the class org.apache.commons.net.ftp.FTP are
the public methods getReplyCode() which returns the integer value of the last
reply code as well as the methods getReplyString() and getReplyStrings() which
return the reply message as a single string with linefeeds or an array of
strings, respectively.

So you could write, for example,
if (!ftp.retrieveFile(remoteFileName, outputStream) {
   log.error("Error code: " + ftp.getReplyCode());
}
or whatever your favorite method of debugging this sort of thing is.

Please have a look at FTPReply.isPositiveCompletion() as well to get an idea of
why Daniel might have coded it the way he did.  Are you sure you want to code a
call there or repeat this logic after every high-level FTP command in your code?  

By the way, are you really using jakarta-commons-net 1.0.4?  Did you perhaps
mean 1.4.0, which is the latest version?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message