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 anInputStream
parse 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 anInputStream
for it so that it can be written to the wire.
-
Constructor Details
-
ByteArrayMarshaller
private ByteArrayMarshaller()
-
-
Method Details
-
stream
Description copied from interface:MethodDescriptor.Marshaller
Given a message, produce anInputStream
for it so that it can be written to the wire. Where possible implementations should produce streams that areKnownLength
to improve transport efficiency.- Specified by:
stream
in interfaceMethodDescriptor.Marshaller<byte[]>
- Parameters:
value
- to serialize.- Returns:
- serialized value as stream of bytes.
-
parse
Description copied from interface:MethodDescriptor.Marshaller
Given anInputStream
parse it into an instance of the declared type so that it can be passed to application code.- Specified by:
parse
in interfaceMethodDescriptor.Marshaller<byte[]>
- Parameters:
stream
- of bytes for serialized value- Returns:
- parsed value
-
parseHelper
- Throws:
IOException
-