Package io.grpc.internal
Class GrpcUtil.AcceptEncodingMarshaller
java.lang.Object
io.grpc.internal.GrpcUtil.AcceptEncodingMarshaller
- All Implemented Interfaces:
InternalMetadata.TrustedAsciiMarshaller<byte[]>
,Metadata.TrustedAsciiMarshaller<byte[]>
- Enclosing class:
GrpcUtil
private static final class GrpcUtil.AcceptEncodingMarshaller
extends Object
implements InternalMetadata.TrustedAsciiMarshaller<byte[]>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
parseAsciiString
(byte[] serialized) Parse a serialized metadata value from an ASCII string.byte[]
toAsciiString
(byte[] value) Serialize a metadata value to a ASCII string that contains only the characters listed in the class comment ofMetadata.AsciiMarshaller
.
-
Constructor Details
-
AcceptEncodingMarshaller
private AcceptEncodingMarshaller()
-
-
Method Details
-
toAsciiString
public byte[] toAsciiString(byte[] value) Description copied from interface:Metadata.TrustedAsciiMarshaller
Serialize a metadata value to a ASCII string that contains only the characters listed in the class comment ofMetadata.AsciiMarshaller
. Otherwise the output may be considered invalid and discarded by the transport, or the call may fail.- Specified by:
toAsciiString
in interfaceMetadata.TrustedAsciiMarshaller<byte[]>
- Parameters:
value
- to serialize- Returns:
- serialized version of value, or null if value cannot be transmitted.
-
parseAsciiString
public byte[] parseAsciiString(byte[] serialized) Description copied from interface:Metadata.TrustedAsciiMarshaller
Parse a serialized metadata value from an ASCII string.- Specified by:
parseAsciiString
in interfaceMetadata.TrustedAsciiMarshaller<byte[]>
- Parameters:
serialized
- value of metadata to parse- Returns:
- a parsed instance of type T
-