diff --git a/core/src/main/java/io/grpc/Metadata.java b/core/src/main/java/io/grpc/Metadata.java index 1d67448cd5..592b97b819 100644 --- a/core/src/main/java/io/grpc/Metadata.java +++ b/core/src/main/java/io/grpc/Metadata.java @@ -69,6 +69,29 @@ public final class Metadata { */ public static final String BINARY_HEADER_SUFFIX = "-bin"; + /** + * Simple metadata marshaller that encodes bytes as is. + * + *
This should be used when raw bytes are favored over un-serialized version of object. Can be + * helpful in situations where more processing to bytes is needed on application side, avoids + * double encoding/decoding.
+ * + *Both #toBytes and #parseBytes methods return copy of the byte array
+ */ + public static final BinaryMarshaller