You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bogdan Drozdowski (JIRA)" <ji...@apache.org> on 2011/03/18 16:10:29 UTC

[jira] Commented: (NET-273) FEAT response parsing

    [ https://issues.apache.org/jira/browse/NET-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008468#comment-13008468 ] 

Bogdan Drozdowski commented on NET-273:
---------------------------------------

Since new features can be added at any moment, I'd see the tests as client.supportsFeature("something"), with a list of currently-known features in a separate class (FTPFeature.java), so client.supportsFeature(FTPFeature.FOO) could also be used. Not all commands are features and not all feature names are commands, so a separate class would be better.

I'd use a java.util.Map<String, String> to hold the features. The number of entries (keys) in the Map would be the number of features the server reported. The first String in an entry would be the first word on a line from the feature list (which should be the feature's name), the second String would be the feature's options - everything after the feature's name (like for MLST).

> FEAT response parsing
> ---------------------
>
>                 Key: NET-273
>                 URL: https://issues.apache.org/jira/browse/NET-273
>             Project: Commons Net
>          Issue Type: Improvement
>          Components: FTP
>    Affects Versions: 2.0
>            Reporter: Shikhar Bhushan
>            Priority: Minor
>
> Would be nice if response to FEAT could be parsed, and a simple method provided like client.isSupported(FTPCommand.MDTM)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira