I like edtftpj very much, but I think some improvements could be made with respect to date parsing. IMHO it doesn't make much sense to use the client's system locale by default for parsing the server's date output. The remote host's locale should be used, and if that can't be found out, Locale.ENGLISH would be the second best choice. I, for example, live in Germany, but hardly any FTP server speaks German, even if located around the corner.
Presently, if the local and remote locales don't happen to correspond, calling dirDetails() causes the program to crash with a ParseException. I think this is too severe a punishment for an end user who has no influence on the program's behavior and knows nothing about the server's locale. A more user-friendly reaction to such situations could be:
1. If the programmer has ever explicitly called setLocale() on the the parser, throw an exception.
2. If not, don't throw. Instead, set the modification date to a significant value, like Date(0).
An alternative (which requires less refactoring) would be adding a method parserThrows(boolean) to FTPClient, which toggles between throwing and using Date(0).
Opinions?
- Bernd