public final class TransportFrameUtil extends Object
Within a given transport frame we reserve the first byte to indicate the type of compression used for the contents of the transport frame.
Modifier and Type | Method and Description |
---|---|
static byte[][] |
toHttp2Headers(Metadata headers)
Transform the given headers to a format where only spec-compliant ASCII characters are allowed.
|
static byte[][] |
toRawSerializedHeaders(byte[][] http2Headers)
Transform HTTP/2-compliant headers to the raw serialized format which can be deserialized by
metadata marshallers.
|
public static byte[][] toHttp2Headers(Metadata headers)
@CheckReturnValue public static byte[][] toRawSerializedHeaders(byte[][] http2Headers)
Warning: This function may partially modify the headers in place by modifying the input
array (but not modifying any single byte), so the input reference http2Headers
can not
be used again.
http2Headers
- the interleaved keys and values of HTTP/2-compliant headersCopyright © 2019. All rights reserved.