public final class Headers extends Object
Message.headers
array. The headers are stored
in the array as follows:
Headers: hdr-1 | hdr-2 | hdr-3 | ... | hdr-n |The arrays are populated from left to right, and any empty slot in 'headers' can terminate an interation (e.g. a getHeader())
Modifier and Type | Method and Description |
---|---|
static Header[] |
copy(Header[] headers) |
static Header |
getHeader(Header[] hdrs,
short id)
Returns the header associated with an ID
|
static Map<Short,Header> |
getHeaders(Header[] hdrs) |
static int |
marshalledSize(Header[] hdrs) |
static String |
printHeaders(Header[] hdrs) |
static String |
printObjectHeaders(Header[] hdrs) |
static Header[] |
putHeader(Header[] headers,
short id,
Header hdr,
boolean replace_if_present)
Adds hdr at the next available slot.
|
static Header[] |
resize(Header[] headers)
Increases the capacity of the array and copies the contents of the old into the new array
|
static int |
size(Header[] hdrs) |
static int |
size(Header[] hdrs,
short... excluded_ids) |
public static Header getHeader(Header[] hdrs, short id)
id
- The IDpublic static Header[] putHeader(Header[] headers, short id, Header hdr, boolean replace_if_present)
headers
- The headers arrayid
- The protocol ID of the headerhdr
- The headerreplace_if_present
- Whether or not to overwrite an existing headerpublic static Header[] resize(Header[] headers)
public static int marshalledSize(Header[] hdrs)
public static int size(Header[] hdrs)
public static int size(Header[] hdrs, short... excluded_ids)
Copyright © 2021 JBoss, a division of Red Hat. All rights reserved.