public static void fillHeaders(@Nullable Metadata metadata, HttpHeadersBuilder builder) {
        if (metadata == null || InternalMetadata.headerCount(metadata) == 0) {
            return;
        }

        final byte[][] serializedMetadata = InternalMetadata.serialize(metadata);
        assert serializedMetadata.length % 2 == 0;

        for (int i = 0; i < serializedMetadata.length; i += 2) {
            final AsciiString name = new AsciiString(serializedMetadata[i], false);

            if (STRIPPED_HEADERS.contains(name)) {
                continue;
            }

            final byte[] valueBytes = serializedMetadata[i + 1];

            final String value;
            if (isBinary(name)) {
                value = BASE64_ENCODING_OMIT_PADDING.encode(valueBytes);
            } else if (isGrpcAscii(valueBytes)) {
                value = new String(valueBytes, StandardCharsets.US_ASCII);
            } else {
                logger.warn("Metadata name=" + name + ", value=" + Arrays.toString(valueBytes) +
                            " contains invalid ASCII characters, skipping.");
                continue;
            }
            builder.add(name, value);
        }
    }
Copies the headers in the gRPC {@link Metadata} to the Armeria {@link HttpHeadersBuilder}. Headers will
be added, without replacing any currently present in the {@link HttpHeaders}.
grpc/src/main/java/com/linecorp/armeria/internal/common/grpc/MetadataUtil.java