On Wednesday 29 September 2004 2:27 pm, Mario Ivankovits wrote:
> Steve Cohen wrote:

>
> Maybe you are right, but at least I think it should be possible to
> implement a "CompositeDateFormat".
> This could be a composite of n languages and it tries every (configured
> - by default eg. US, FR, DE) language (and maybe by using
> SimpleDateFormat) until a match is found.
> Same thing we did for the NTFTPFileEntryParser to automatically
> distinguish between NT and UNIX format.

Whew! I'm trying to get my mind around that one!  I see problems you would 
need to address.

1) What is the meaning of "tries"?  First parser to successfully parse every 
item in the listing I suppose.  Or do you go for best score?  What if none of 
the parsers in your composite works?  Then what?

2) Will we be opening ourselves to arguments as to which languages are "in" 
the composite?  Or in which order?  If you're using Italian and it has to try 
US English, British English, French and German first, your performance is 
going to be lousy.  Which brings me to

3) This is too much run-time trial and error for my tastes.  The average user 
of our library is not writing the ultimate FTP client.  He is writing a java 
app or Ant script to connect repeatedly to an FTP server somewhere.  Once he 
gets the right parser, he never has need of trying others for that server.

4) On the other hand, your idea could be the basis of a pretty cool tool based 
on NetComponents: point it at an FTP server somewhere, let it try all the 
tricks it knows, and somehow it returns its best guess as to what parser and 
parser date format to use for that server.
>
> Maybe you might not want an implementation of CompositeDateFormat in the
> main version of net, but it would be nice if this could be possible.
>
> ---
> Mario
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to