Class MarshalerInputStream
java.lang.Object
java.io.InputStream
io.opentelemetry.exporter.internal.grpc.MarshalerInputStream
- All Implemented Interfaces:
io.grpc.Drainable
,io.grpc.KnownLength
,Closeable
,AutoCloseable
public final class MarshalerInputStream
extends InputStream
implements io.grpc.Drainable, io.grpc.KnownLength
Adapter from
Marshaler
to gRPC types.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
int
drainTo
(OutputStream target) int
read()
int
read
(byte[] b, int off, int len) private static byte[]
toByteArray
(Marshaler message) Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
message
-
partial
-
-
Constructor Details
-
MarshalerInputStream
Creates a newMarshalerInputStream
.
-
-
Method Details
-
drainTo
- Specified by:
drainTo
in interfaceio.grpc.Drainable
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
toByteArray
- Throws:
IOException
-
available
public int available()- Specified by:
available
in interfaceio.grpc.KnownLength
- Overrides:
available
in classInputStream
-