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 java.lang.Object implements MethodDescriptor.Marshaller<byte[]>
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ByteArrayMarshaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
parse(java.io.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(java.io.InputStream stream)
java.io.InputStream
stream(byte[] value)
Given a message, produce anInputStream
for it so that it can be written to the wire.
-
-
-
Method Detail
-
stream
public java.io.InputStream stream(byte[] value)
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
public byte[] parse(java.io.InputStream stream)
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
private byte[] parseHelper(java.io.InputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
-