Package io.grpc
Interface KnownLength
-
public interface KnownLengthAnInputStreamor alike whose total number of bytes that can be read is known upfront.Usually it's a
InputStreamthat also implements this interface, in which caseInputStream.available()has a stronger semantic by returning an accurate number instead of an estimation.
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
available
int available() throws IOExceptionReturns the total number of bytes that can be read (or skipped over) from this object until all bytes have been read out.- Throws:
IOException
-
-