commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ortwin Gl├╝ck" <ortwin.glu...@nose.ch>
Subject Re: [HttpClient] HttpURLConnection wrapper problems caused by deficienciesin HttpClient
Date Tue, 03 Sep 2002 11:46:41 GMT
Jeff Dever wrote:
> Its just a string.  Would you prefer a new member and function in HttpMethod:
> String getStatusLine();

Yes please. Storing it with the headers would be abuse. Abuse is evil :-)


> A Map makes more sense than a list because the members are most commonly looked up by
> name so its just more logical.  But the order preservation is a problem.  We could
> just use a list and iterate over it for lookups, but there would be insertion issues
> with repeated entries and such.

Good point.

> As Ryan suggested, a SequencedHashMap is perfect because it is both a Map and a
> List.  It would be easy to add as well, because it implements the Map interface.

I haven't known this class before and it seems the perfect solution for 
our problem.

> The only real drawback (and this applies to HashMap as well as SequencedHashMap) is
> that they take up more space than a simple List.

Of course. But I think we should invest in those few extra bytes.


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


Mime
View raw message