public class Headers extends Object
IDs: id-1 | id-2 | id-3 | ... | id-n | Headers: hdr-1 | hdr-2 | hdr-3 | ... | hdr-n |The arrays are populated from left to right, and any 0 slots in 'ids' can terminate an interation, or signal empty slots.
Constructor and Description |
---|
Headers(Headers other) |
Headers(int capacity) |
Modifier and Type | Method and Description |
---|---|
int |
capacity() |
Headers |
copy() |
Header |
getHeader(short id)
Returns the header associated with an ID
|
Map<Short,Header> |
getHeaders() |
Header[] |
getRawHeaders() |
short[] |
getRawIDs() |
int |
marshalledSize() |
String |
printHeaders() |
String |
printObjectHeaders() |
void |
putHeader(short id,
Header hdr)
Puts a header given a key into the hashmap.
|
Header |
putHeaderIfAbsent(short id,
Header hdr)
Puts a header given a key into the map, only if the key doesn't exist yet
|
int |
size() |
String |
toString() |
public Headers(int capacity)
public Headers(Headers other)
public short[] getRawIDs()
public Header[] getRawHeaders()
public Header getHeader(short id)
id
- The IDpublic String printHeaders()
public void putHeader(short id, Header hdr)
public Header putHeaderIfAbsent(short id, Header hdr)
id
- hdr
- public Headers copy()
public int marshalledSize()
public int size()
public int capacity()
public String printObjectHeaders()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.