* @param name header name
* @return array of header values, or null if none
*/
public String[] getHeader(String name) {
// XXX - should we just step through in index order?
FinalArrayList v = new FinalArrayList(); // accumulate return values
int len = headers.size();
for( int i=0; i<len; i++ ) {
hdr h = (hdr) headers.get(i);
if (name.equalsIgnoreCase(h.name)) {
v.add(h.getValue());
}
}
if (v.size() == 0)
return (null);
// convert Vector to an array for return
return (String[]) v.toArray(new String[v.size()]);
}