public final class Headers
extends java.lang.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 java.util.Map<java.lang.Short,Header> |
getHeaders(Header[] hdrs) |
static int |
marshalledSize(Header[] hdrs) |
static java.lang.String |
printHeaders(Header[] hdrs) |
static java.lang.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 java.lang.String printHeaders(Header[] hdrs)
public 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 java.lang.String printObjectHeaders(Header[] hdrs)
public static int marshalledSize(Header[] hdrs)
public static int size(Header[] hdrs)
public static int size(Header[] hdrs, short... excluded_ids)
Copyright © 1998-2020 Red Hat. All Rights Reserved.