MCPcopy Create free account
hub / github.com/grpc/grpc-java / convertHeadersToArray

Method convertHeadersToArray

okhttp/src/main/java/io/grpc/okhttp/Utils.java:56–65  ·  view source on GitHub ↗
(List<Header> http2Headers)

Source from the content-addressed store, hash-verified

54 }
55
56 @CheckReturnValue
57 private static byte[][] convertHeadersToArray(List<Header> http2Headers) {
58 byte[][] headerValues = new byte[http2Headers.size() * 2][];
59 int i = 0;
60 for (Header header : http2Headers) {
61 headerValues[i++] = header.name.toByteArray();
62 headerValues[i++] = header.value.toByteArray();
63 }
64 return TransportFrameUtil.toRawSerializedHeaders(headerValues);
65 }
66
67 /**
68 * Converts an instance of {@link com.squareup.okhttp.ConnectionSpec} for a secure connection into

Callers 2

convertHeadersMethod · 0.95
convertTrailersMethod · 0.95

Calls 3

sizeMethod · 0.65
toByteArrayMethod · 0.45

Tested by

no test coverage detected