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

Method AsciiKey

api/src/main/java/io/grpc/Metadata.java:970–978  ·  view source on GitHub ↗

Keys have a name and an ASCII marshaller used for serialization.

(String name, boolean pseudo, AsciiMarshaller<T> marshaller)

Source from the content-addressed store, hash-verified

968
969 /** Keys have a name and an ASCII marshaller used for serialization. */
970 private AsciiKey(String name, boolean pseudo, AsciiMarshaller<T> marshaller) {
971 super(name, pseudo, marshaller);
972 Preconditions.checkArgument(
973 !name.endsWith(BINARY_HEADER_SUFFIX),
974 "ASCII header is named %s. Only binary headers may end with %s",
975 name,
976 BINARY_HEADER_SUFFIX);
977 this.marshaller = Preconditions.checkNotNull(marshaller, "marshaller");
978 }
979
980 @Override
981 byte[] toBytes(T value) {

Callers

nothing calls this directly

Calls 2

checkNotNullMethod · 0.80
endsWithMethod · 0.45

Tested by

no test coverage detected