Gets all header values for a given header name.

@param name name of the header
@return array of header values
966303
public String[] getHeaders(String name) {
        List<String> headerList = httpRequest.headers().getAll(name);
        return headerList.toArray(new String[0]);
    }
28269
@SuppressWarnings("unchecked")
    public <R> R getHeader(String name) {
        return (R) headers().get(name);
    }
434348
public List<String> getHeaders(String name) {
        requireNonNull(name);
        List<String> values = lazyMap.get().get(name.toLowerCase());
        if (values == null) {
            return Lists.of();
        }
        return Collections.unmodifiableList(values);
    }
1124482
private List<String> getHeaderValues(String headerName) {
		if (additionalHttpHeaders.get(headerName) == null) {
			additionalHttpHeaders.put(headerName, new ArrayList<String>());
		}
		return additionalHttpHeaders.get(headerName);
	}
1021440
public String getHeader(String name, String defaultValue) {
        return header.getValue(name, defaultValue);
    }
466373
public function getValues(string $name, array $default = []): array
    {
        $key = strtolower($name);
        if (!array_key_exists($key, $this->headers)) {
            return $default;
        }

        return $this->headers[$key]->getValuesAsArray();
    }
897161
public function getHeaders($name = NULL)
	{
		if($name === NULL)
		{
			return $this->headers;
		}
		
		$n = strtolower($name);
		
		if(empty($this->headers[$n]))
		{
			return [];
		}
		
		$headers = [];
		
		foreach($this->headers[$n] as $data)
		{
			$headers[] = $data;
		}
		
		return $headers;
	}
662457
@Nonnull
  public ICommonsList <String> getHeaders (@Nullable final String sName)
  {
    return new CommonsArrayList <> (m_aHeaders.get (_unifyHeaderName (sName)));
  }
1077137
public String header(String name) {
		final List<String> values = headerList(name);
		if(CollectionUtil.isEmpty(values)) {
			return null;
		}
		return values.get(0);
	}
584024
public function getHeader($name, $all=false)
    {
        $nameLower = strtolower($name);
        if ($all) {
            $values = [];
            foreach ($this->_headers as &$h) {
                if ($h && strtolower($h[0]) == $nameLower) {
                    $values[] = $h[1];
                }
            }
            return $values;
        } else {
            foreach ($this->_headers as &$h) {
                if ($h && strtolower($h[0]) == $nameLower) {
                    return $h[1];
                }
            }
        }
        return null;
    }
418416
public String getHeader(String name)
  {
    if (_header != null)
    {
      String strVal = _header.getHeader(name);
      if (strVal != null)
        return strVal;
    }
    if (this.headerTable != null)
    {
      int i = 0;
      for (Object obj : headerTable[0])
      {
        String strVal = (String) obj;
        if (name.equals(strVal))
        {
          return (String) headerTable[1].get(i);
        }
        i++;
      }
    }
    return null;
  }
1135092
public function all($name)
    {
        $items = [];

        if ($this->hasValue($name)) {
            $items[] = $this->getValue($name);
        }

        foreach ($this->getStructures() as $childStructure) {
            $items = array_merge($items, $childStructure->all($name));
        }

        return $items;
    }
489874
public List<String> getAll(String name) {
        if (properties == null) {
            return null;
        }
        final List<String> all = new ArrayList<String>();
        for (Property property : properties) {
            if (property.getName().equals(name)) {
                all.add(property.getValue());
            }
        }
        return all;
    }
724320
public String[] getFilenames(String name) 
    {
        List parts = (List)_partMap.getValues(name);
        if (parts==null)
            return null;
        String[] filenames = new String[parts.size()];
        for (int i=0; i<filenames.length; i++) {
            filenames[i] = ((Part)parts.get(i))._filename;
        }
        return filenames;
    }
155044
@SuppressWarnings("unchecked")
  public <T extends Value<?>> List<T> getList(String name) {
    return (List<T>) getValue(name).get();
  }
297722
public ListIterator<String> getHeaders(String name) {
		String nameToSearch = getCorrectHeaderName(name);
		ArrayList<String> result = new ArrayList<String>();

		try {
			ListIterator<Header> list = this.message.getHeaders(nameToSearch);
			while (list != null && list.hasNext()) {
				Header h = list.next();
				result.add(((SIPHeader)h).getHeaderValue());
			}
		} catch (Exception e) {
			logger.fatal("Couldnt fetch headers, original name[" + name
					+ "], name searched[" + nameToSearch + "]", e);
			return result.listIterator();
		}
		return result.listIterator();
	}
387488
public final function getHeaderValue($name)
    {
        self::checkString($name);

        foreach ($this->_headers as $headerName => $headerValue) {

            if (strcasecmp($name, $headerName) === 0) {

                return $headerValue;
            }
        }

        return null;
    }