Top Description Fields Constructors Methods
org.apache.http.message

public Class BasicHeaderElementIterator

extends Object
implements HeaderElementIterator
Class Inheritance
All Implemented Interfaces
org.apache.http.HeaderElementIterator, java.util.Iterator
Imports
java.util.NoSuchElementException, org.apache.http.FormattedHeader, .Header, .HeaderElement, .HeaderElementIterator, .HeaderIterator, org.apache.http.util.Args, .CharArrayBuffer

Basic implementation of a HeaderElementIterator.
Since
4.0

Field Summary

Modifier and TypeField and Description
private CharArrayBuffer
private HeaderElement
private ParserCursor
private final HeaderIterator
private final HeaderValueParser

Constructor Summary

AccessConstructor and Description
public
BasicHeaderElementIterator(final HeaderIterator headerIterator, final HeaderValueParser parser)

Creates a new instance of BasicHeaderElementIterator

public

Method Summary

Modifier and TypeMethod and Description
private void
public boolean
hasNext()

Implements org.apache.http.HeaderElementIterator.hasNext.

Indicates whether there is another header element in this iteration.
public final Object
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.
public HeaderElement
nextElement()

Implements org.apache.http.HeaderElementIterator.nextElement.

Obtains the next header element from this iteration.
private void
public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private CharArrayBuffer buffer
currentElementback to summary
private HeaderElement currentElement
cursorback to summary
private ParserCursor cursor
headerItback to summary
private final HeaderIterator headerIt
parserback to summary
private final HeaderValueParser parser

Constructor Detail

BasicHeaderElementIteratorback to summary
public BasicHeaderElementIterator(final HeaderIterator headerIterator, final HeaderValueParser parser)

Creates a new instance of BasicHeaderElementIterator

BasicHeaderElementIteratorback to summary
public BasicHeaderElementIterator(final HeaderIterator headerIterator)

Method Detail

bufferHeaderValueback to summary
private void bufferHeaderValue()
hasNextback to summary
public boolean hasNext()

Implements org.apache.http.HeaderElementIterator.hasNext.

Doc from org.apache.http.HeaderElementIterator.hasNext.

Indicates whether there is another header element in this iteration.

Returns:boolean

true if there is another header element, false otherwise

Annotations
@Override
nextback to summary
public final Object next() throws NoSuchElementException

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:Object

the next element in the iteration

Annotations
@Override
Exceptions
NoSuchElementException:
if the iteration has no more elements
nextElementback to summary
public HeaderElement nextElement() throws NoSuchElementException

Implements org.apache.http.HeaderElementIterator.nextElement.

Doc from org.apache.http.HeaderElementIterator.nextElement.

Obtains the next header element from this iteration. This method should only be called while hasNext is true.

Returns:HeaderElement

the next header element in this iteration

Annotations
@Override
parseNextElementback to summary
private void parseNextElement()
removeback to summary
public void remove() throws UnsupportedOperationException

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override
Exceptions
UnsupportedOperationException:
if the remove operation is not supported by this iterator