Methods Summary |
---|
protected boolean | filterHeader(int index)Checks whether a header is part of the iteration.
return (this.headerName == null) ||
this.headerName.equalsIgnoreCase(this.allHeaders[index].getName());
|
protected int | findNext(int from)Determines the index of the next header.
if (from < -1)
return -1;
final int to = this.allHeaders.length-1;
boolean found = false;
while (!found && (from < to)) {
from++;
found = filterHeader(from);
}
return found ? from : -1;
|
public boolean | hasNext()
return (this.currentIndex >= 0);
|
public final java.lang.Object | next()Returns the next header.
Same as {@link #nextHeader nextHeader}, but not type-safe.
return nextHeader();
|
public org.apache.http.Header | nextHeader()Obtains the next header from this iteration.
final int current = this.currentIndex;
if (current < 0) {
throw new NoSuchElementException("Iteration already finished.");
}
this.currentIndex = findNext(current);
return this.allHeaders[current];
|
public void | remove()Removing headers is not supported.
throw new UnsupportedOperationException
("Removing headers is not supported.");
|