Code example for BasicHeader

0
    @Override 
    public Header getFirstHeader(String name) {
        String value = getHeaders().getHeaders().get(name);
        if (value == null)
            return null; 
        return new BasicHeader(name, value);
    } 
 
    @Override 
    public Header[] getHeaders(String name) {
        Map<String, List<String>> map = getHeaders().getHeaders().toMultimap();
        List<String> vals = map.get(name);
        if (vals == null)
            return new Header[0];
        Header[] ret = new Header[vals.size()];
        for (int i = 0; i < ret.length; i++)
            ret[i] = new BasicHeader(name, vals.get(i));
        return ret;
    } 
 
    @Override