Class BasicHeaderIterator

java.lang.Object
org.apache.http.message.BasicHeaderIterator
All Implemented Interfaces:
Iterator, HeaderIterator

public class BasicHeaderIterator
extends Object
implements HeaderIterator
Basic implementation of a HeaderIterator.
Version:
$Revision: 581981 $
  • Field Details

    • allHeaders

      protected final Header[] allHeaders
      An array of headers to iterate over. Not all elements of this array are necessarily part of the iteration. This array will never be modified by the iterator. Derived implementations are expected to adhere to this restriction.
    • currentIndex

      protected int currentIndex
      The position of the next header in allHeaders. Negative if the iteration is over.
    • headerName

      protected String headerName
      The header name to filter by. null to iterate over all headers in the array.
  • Constructor Details

    • BasicHeaderIterator

      public BasicHeaderIterator​(Header[] headers, String name)
      Creates a new header iterator.
      Parameters:
      headers - an array of headers over which to iterate
      name - the name of the headers over which to iterate, or null for any
  • Method Details