protected class DefaultHttp2FrameReader.HeadersBlockBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private ByteBuf |
headerBlock |
Modifier | Constructor and Description |
---|---|
protected |
HeadersBlockBuilder() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addFragment(ByteBuf fragment,
ByteBufAllocator alloc,
boolean endOfHeaders)
Adds a fragment to the block.
|
(package private) void |
close()
Closes this builder and frees any resources.
|
(package private) Http2Headers |
headers()
Builds the headers from the completed headers block.
|
private void |
headerSizeExceeded()
The local header size maximum has been exceeded while accumulating bytes.
|
private ByteBuf headerBlock
private void headerSizeExceeded() throws Http2Exception
Http2Exception
- A connection error indicating too much data has been received.final void addFragment(ByteBuf fragment, ByteBufAllocator alloc, boolean endOfHeaders) throws Http2Exception
fragment
- the fragment of the headers block to be added.alloc
- allocator for new blocks if needed.endOfHeaders
- flag indicating whether the current frame is the end of the headers.
This is used for an optimization for when the first fragment is the full
block. In that case, the buffer is used directly without copying.Http2Exception
Http2Headers headers() throws Http2Exception
Http2Exception
void close()