/** * Return all the values for the specified header. The * values are String objects. Returns <code>null</code> * if no headers with the specified name exist. * * @param name header name * @return array of header values, or null if none */ List<String> getHeader(String name) { // XXX - should we just step through in index order? FinalArrayList<String> v = new FinalArrayList<String>(); // 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()); } } return (v.size() == 0) ? null : v; }
/** * Return all the values for the specified header. The * values are String objects. Returns <code>null</code> * if no headers with the specified name exist. * * @param name header name * @return array of header values, or null if none */ List<String> getHeader(String name) { // XXX - should we just step through in index order? FinalArrayList<String> v = new FinalArrayList<String>(); // 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()); } } return (v.size() == 0) ? null : v; }
/** * Return all the values for the specified header. The * values are String objects. Returns <code>null</code> * if no headers with the specified name exist. * * @param name header name * @return array of header values, or null if none */ List<String> getHeader(String name) { // XXX - should we just step through in index order? FinalArrayList<String> v = new FinalArrayList<String>(); // 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()); } } return (v.size() == 0) ? null : v; }
/** * Return all the values for the specified header. The * values are String objects. Returns <code>null</code> * if no headers with the specified name exist. * * @param name header name * @return array of header values, or null if none */ List<String> getHeader(String name) { // XXX - should we just step through in index order? FinalArrayList<String> v = new FinalArrayList<String>(); // 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()); } } return (v.size() == 0) ? null : v; }