Basic implementation of a com.good.gd.apache.http.HeaderIterator. More...
The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Public Member Functions | |
BasicHeaderIterator (Header[] headers, String name) | |
Creates a new header iterator. More... | |
boolean | hasNext () |
Indicates whether there is another header in this iteration. More... | |
Header | nextHeader () throws NoSuchElementException |
Obtains the next header from this iteration. More... | |
final Object | next () throws NoSuchElementException |
Returns the next header. More... | |
void | remove () throws UnsupportedOperationException |
Removing headers is not supported. More... | |
Protected Member Functions | |
int | findNext (int from) |
Determines the index of the next header. More... | |
boolean | filterHeader (int index) |
Checks whether a header is part of the iteration. More... | |
Protected Attributes | |
final Header[] | allHeaders |
An array of headers to iterate over. More... | |
int | currentIndex |
The position of the next header in allHeaders . More... | |
String | headerName |
The header name to filter by. More... | |
BasicHeaderIterator | ( | Header[] | headers, |
String | name | ||
) |
headers | an array of headers over which to iterate |
name | the name of the headers over which to iterate, or null for any |
|
protected |
from | one less than the index to consider first, -1 to search for the first header |
|
protected |
index | the index of the header to check |
true
if the header should be part of the iteration, false
to skip boolean hasNext | ( | ) |
true
if there is another header, false
otherwise Implements HeaderIterator.
Header nextHeader | ( | ) | throws NoSuchElementException |
NoSuchElementException | if there are no more headers |
Implements HeaderIterator.
final Object next | ( | ) | throws NoSuchElementException |
Same as nextHeader , but not type-safe.
NoSuchElementException | if there are no more headers |
void remove | ( | ) | throws UnsupportedOperationException |
UnsupportedOperationException | always |
|
protected |
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.
|
protected |
Negative if the iteration is over.
|
protected |
null
to iterate over all headers in the array.