Package com.google.protobuf
Class AbstractMessageLite.Builder.LimitedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
AbstractMessageLite.Builder<MessageType extends AbstractMessageLite<MessageType,
BuilderType>, BuilderType extends AbstractMessageLite.Builder<MessageType, BuilderType>>
An InputStream implementations which reads from some other InputStream but is limited to a
particular number of bytes. Used by mergeDelimitedFrom(). This is intentionally
package-private so that UnknownFieldSet can share it.
-
Field Summary
FieldsFields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterInputStream
close, mark, markSupported, read, reset
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
limit
private int limit
-
-
Constructor Details
-
LimitedInputStream
LimitedInputStream(InputStream in, int limit)
-
-
Method Details
-
available
- Overrides:
available
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classFilterInputStream
- Throws:
IOException
-