Additional top-level classes in compilation unit: BaseIterator, NamesIterator, ValuesIterator, MimeHeaderField.
Todo
XXX one-buffer parsing - for HTTP ( other protocols don't need that ) XXX remove unused methods XXX External enumerations, with 0 GC. XXX use HeaderName ID
| Modifier and Type | Class and Description |
|---|---|
| public class |
| Modifier and Type | Field and Description |
|---|---|
| private int | count
The current number of header fields. |
| public static final int | DEFAULT_HEADER_SIZE
Initial size - should be == average number of headers per request XXX make it configurable ( fine-tuning of web-apps ) |
| private MimeHeaderField[] | headers
The header fields. |
| private static final String[] | |
| protected int | |
| private boolean | |
| public static final int | |
| public static final int | |
| private int | |
| private final Iterable | namesIterable
The header names |
| public static DataChunk |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public DataChunk | |
| public DataChunk | |
| public DataChunk | addValue(final byte[] buffer, final int startN, final int len)
Create a new named header using un-translated byte[]. |
| public DataChunk | |
| public void | |
| public boolean | |
| public boolean | |
| private static void | |
| public void | |
| private MimeHeaderField | |
| public String | |
| public String | |
| public int | |
| public DataChunk | |
| public DataChunk | |
| public DataChunk | |
| public DataChunk | |
| public int | |
| public int | |
| public boolean | Returns: the header's "serialized" flag value.the header index n)Get the header's "serialized" flag. |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| public void | |
| public Iterable | |
| public void | |
| public void | removeHeader(String
the name of the header field to be removed name)Removes a header field with the specified name. |
| public void | |
| public void | removeHeader(final String
The name of the headers to be removed name, final String The string to check the header values against str)Removes the headers with the given name whose values contain the given string. |
| pack-priv void | |
| public void | removeHeaderMatches(final String
The name of the headers to be removed name, final String The regex string to check the header values against regex)Removes the headers with the given name whose values contain the given string. |
| public void | removeHeaderMatches(final Header
The name of the header, final String Headers to be removedThe regex string to check the header values against regex)Removes the headers with the given name whose values contain the given string. |
| public void | |
| public boolean | Returns: the old header "serialized" flag value.the header index n, boolean the new value newValue)Set the header's "serialized" flag. |
| public DataChunk | |
| public DataChunk | |
| public int | |
| public String | |
| public Iterable | |
| public int | |
| public Iterable | |
| public Iterable | |
| public Iterable | |
| public Iterable |
| count | back to summary |
|---|---|
| private int count The current number of header fields. | |
| DEFAULT_HEADER_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_HEADER_SIZE Initial size - should be == average number of headers per request XXX make it configurable ( fine-tuning of web-apps ) | |
| headers | back to summary |
|---|---|
| private MimeHeaderField[] headers The header fields. | |
| INVALID_TRAILER_NAMES | back to summary |
|---|---|
| private static final String[] INVALID_TRAILER_NAMES | |
| mark | back to summary |
|---|---|
| protected int mark | |
| marked | back to summary |
|---|---|
| private boolean marked | |
| MAX_NUM_HEADERS_DEFAULT | back to summary |
|---|---|
| public static final int MAX_NUM_HEADERS_DEFAULT | |
| MAX_NUM_HEADERS_UNBOUNDED | back to summary |
|---|---|
| public static final int MAX_NUM_HEADERS_UNBOUNDED | |
| maxNumHeaders | back to summary |
|---|---|
| private int maxNumHeaders | |
| namesIterable | back to summary |
|---|---|
| private final Iterable<String> namesIterable The header names | |
| NOOP_CHUNK | back to summary |
|---|---|
| public static DataChunk NOOP_CHUNK | |
| MimeHeaders | back to summary |
|---|---|
| public MimeHeaders() Creates a new MimeHeaders object using a default buffer size. | |
| addValue | back to summary |
|---|---|
| public DataChunk addValue(String name) Create a new named header , return the MessageBytes container for the new value | |
| addValue | back to summary |
|---|---|
| public DataChunk addValue(final Header header) Create a new named header , return the MessageBytes container for the new value | |
| addValue | back to summary |
|---|---|
| public DataChunk addValue(final byte[] buffer, final int startN, final int len) Create a new named header using un-translated byte[]. The conversion to chars can be delayed until encoding is known. | |
| addValue | back to summary |
|---|---|
| public DataChunk addValue(final Buffer buffer, final int startN, final int len) Create a new named header using un-translated Buffer. The conversion to chars can be delayed until encoding is known. | |
| clear | back to summary |
|---|---|
| public void clear() Clears all header fields. | |
| contains | back to summary |
|---|---|
| public boolean contains(final Header header) | |
| contains | back to summary |
|---|---|
| public boolean contains(final String header) | |
| copyBufferChunk | back to summary |
|---|---|
| private static void copyBufferChunk(DataChunk source, DataChunk dest) | |
| copyFrom | back to summary |
|---|---|
| public void copyFrom(final MimeHeaders source) | |
| createHeader | back to summary |
|---|---|
| private MimeHeaderField createHeader() Adds a partially constructed field to the header. This field has not had its name or value initialized. | |
| getHeader | back to summary |
|---|---|
| public String getHeader(String name) | |
| getHeader | back to summary |
|---|---|
| public String getHeader(final Header header) | |
| getMaxNumHeaders | back to summary |
|---|---|
public int getMaxNumHeaders()
| |
| getName | back to summary |
|---|---|
| public DataChunk getName(int n) Returns the Nth header name, or null if there is no such header. This may be used to iterate through all header fields. | |
| getValue | back to summary |
|---|---|
| public DataChunk getValue(int n) Returns the Nth header value, or null if there is no such header. This may be used to iterate through all header fields. | |
| getValue | back to summary |
|---|---|
| public DataChunk getValue(String name) Finds and returns a header field with the given name. If no such field exists, null is returned. If more than one such field is in the header, an arbitrary one is returned. | |
| getValue | back to summary |
|---|---|
| public DataChunk getValue(final Header header) Finds and returns a header field with the given name. If no such field exists, null is returned. If more than one such field is in the header, an arbitrary one is returned. | |
| indexOf | back to summary |
|---|---|
| public int indexOf(String name, int fromIndex) Find the index of a header with the given name. | |
| indexOf | back to summary |
|---|---|
| public int indexOf(final Header header, final int fromIndex) Find the index of a header with the given name. | |
| isSerialized | back to summary |
|---|---|
| public boolean isSerialized(int n) Get the header's "serialized" flag.
| |
| isValidName | back to summary |
|---|---|
| private boolean isValidName(final String name) | |
| isValidName | back to summary |
|---|---|
| private boolean isValidName(final Header name) | |
| isValidName | back to summary |
|---|---|
| private boolean isValidName(final byte[] name) | |
| isValidName | back to summary |
|---|---|
| private boolean isValidName(final Buffer name) | |
| mark | back to summary |
|---|---|
| public void mark() | |
| names | back to summary |
|---|---|
| public Iterable Returns an enumeration of strings representing the header field names. Field names may appear multiple times in this enumeration, indicating that multiple fields with that name exist in this header. | |
| recycle | back to summary |
|---|---|
| public void recycle() Clears all header fields. | |
| removeHeader | back to summary |
|---|---|
| public void removeHeader(String name) Removes a header field with the specified name. Does nothing if such a field could not be found.
| |
| removeHeader | back to summary |
|---|---|
| public void removeHeader(final Header header) | |
| removeHeader | back to summary |
|---|---|
| public void removeHeader(final String name, final String str) Removes the headers with the given name whose values contain the given string.
| |
| removeHeader | back to summary |
|---|---|
| pack-priv void removeHeader(int idx) reset and swap with last header
| |
| removeHeaderMatches | back to summary |
|---|---|
| public void removeHeaderMatches(final String name, final String regex) Removes the headers with the given name whose values contain the given string.
| |
| removeHeaderMatches | back to summary |
|---|---|
| public void removeHeaderMatches(final Header header, final String regex) Removes the headers with the given name whose values contain the given string. | |
| setMaxNumHeaders | back to summary |
|---|---|
| public void setMaxNumHeaders(int maxNumHeaders) | |
| setSerialized | back to summary |
|---|---|
| public boolean setSerialized(int n, boolean newValue) Set the header's "serialized" flag.
| |
| setValue | back to summary |
|---|---|
| public DataChunk setValue(final String name) Allow "set" operations - return a DataChunk container for the header value ( existing header or new if this . | |
| setValue | back to summary |
|---|---|
| public DataChunk setValue(final Header header) Allow "set" operations - return a DataChunk container for the header value ( existing header or new if this . | |
| size | back to summary |
|---|---|
| public int size() Returns the current number of header fields. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. EXPENSIVE!!! only for debugging.
| |
| trailerNames | back to summary |
|---|---|
| public Iterable | |
| trailerSize | back to summary |
|---|---|
| public int trailerSize() | |
| trailerValues | back to summary |
|---|---|
| public Iterable | |
| trailerValues | back to summary |
|---|---|
public Iterable
| |
| values | back to summary |
|---|---|
| public Iterable | |
| values | back to summary |
|---|---|
| public Iterable | |
| Access | Constructor and Description |
|---|---|
| public |
| MaxHeaderCountExceededException | back to summary |
|---|---|
| public MaxHeaderCountExceededException() | |