Package io.grpc.protobuf.services
Class BinaryLogProvider.ByteArrayMarshaller
java.lang.Object
io.grpc.protobuf.services.BinaryLogProvider.ByteArrayMarshaller
- All Implemented Interfaces:
MethodDescriptor.Marshaller<byte[]>
- Enclosing class:
BinaryLogProvider
private static final class BinaryLogProvider.ByteArrayMarshaller
extends Object
implements MethodDescriptor.Marshaller<byte[]>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]parse(InputStream stream) Given anInputStreamparse it into an instance of the declared type so that it can be passed to application code.private byte[]parseHelper(InputStream stream) stream(byte[] value) Given a message, produce anInputStreamfor it so that it can be written to the wire.
-
Constructor Details
-
ByteArrayMarshaller
private ByteArrayMarshaller()
-
-
Method Details
-
stream
Description copied from interface:MethodDescriptor.MarshallerGiven a message, produce anInputStreamfor it so that it can be written to the wire. Where possible implementations should produce streams that areKnownLengthto improve transport efficiency.- Specified by:
streamin interfaceMethodDescriptor.Marshaller<byte[]>- Parameters:
value- to serialize.- Returns:
- serialized value as stream of bytes.
-
parse
Description copied from interface:MethodDescriptor.MarshallerGiven anInputStreamparse it into an instance of the declared type so that it can be passed to application code.- Specified by:
parsein interfaceMethodDescriptor.Marshaller<byte[]>- Parameters:
stream- of bytes for serialized value- Returns:
- parsed value
-
parseHelper
- Throws:
IOException
-