Package io.grpc.protobuf.lite
Class ProtoInputStream
- java.lang.Object
-
- java.io.InputStream
-
- io.grpc.protobuf.lite.ProtoInputStream
-
- All Implemented Interfaces:
Drainable,KnownLength,java.io.Closeable,java.lang.AutoCloseable
final class ProtoInputStream extends java.io.InputStream implements Drainable, KnownLength
AnInputStreambacked by a protobuf.
-
-
Constructor Summary
Constructors Constructor Description ProtoInputStream(com.google.protobuf.MessageLite message, com.google.protobuf.Parser<?> parser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()Returns the total number of bytes that can be read (or skipped over) from this object until all bytes have been read out.intdrainTo(java.io.OutputStream target)Transfers the entire contents of this stream to the specified target.(package private) com.google.protobuf.MessageLitemessage()(package private) com.google.protobuf.Parser<?>parser()intread()intread(byte[] b, int off, int len)
-
-
-
Method Detail
-
drainTo
public int drainTo(java.io.OutputStream target) throws java.io.IOExceptionDescription copied from interface:DrainableTransfers the entire contents of this stream to the specified target.
-
read
public int read()
- Specified by:
readin classjava.io.InputStream
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
available
public int available()
Description copied from interface:KnownLengthReturns the total number of bytes that can be read (or skipped over) from this object until all bytes have been read out.- Specified by:
availablein interfaceKnownLength- Overrides:
availablein classjava.io.InputStream
-
message
com.google.protobuf.MessageLite message()
-
parser
com.google.protobuf.Parser<?> parser()
-
-