Package org.qubership.profiler.io
Class LimitedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.qubership.profiler.io.LimitedInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionLimitedInputStream(InputStream in, long maxSize) Creates a new filtered reader. -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, resetMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
LimitedInputStream
Creates a new filtered reader.- Parameters:
in- a Reader object providing the underlying stream.maxSize- number of bytes to read- Throws:
NullPointerException- ifinisnull
-
-
Method Details
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
position
public long position()
-