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 privateByteArrayMarshaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]parse(java.io.InputStream stream)Given anInputStreamparse 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.InputStreamstream(byte[] value)Given a message, produce anInputStreamfor 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.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
public byte[] parse(java.io.InputStream stream)
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
private byte[] parseHelper(java.io.InputStream stream) throws java.io.IOException- Throws:
java.io.IOException
-
-