Class BoundedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.sblim.cimclient.internal.http.io.BoundedInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
Class BoundedInputStream implements an input stream with a maximum byte
count.
-
Field Summary
Fields inherited from class FilterInputStream
in
-
Constructor Summary
ConstructorsConstructorDescriptionBoundedInputStream
(InputStream pStream) Ctor.BoundedInputStream
(InputStream pStream, long pMaximumLength) Ctor. -
Method Summary
Methods inherited from class FilterInputStream
mark, markSupported, reset
Methods inherited from class InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
BoundedInputStream
Ctor. Creates the stream with unlimited length.- Parameters:
pStream
- The stream this one is build upon
-
BoundedInputStream
Ctor.- Parameters:
pStream
- The stream this one is build uponpMaximumLength
- The maximum number of bytes that can be read from this stream. A value of -1 represents unlimited mode.
-
-
Method Details
-
read
- Overrides:
read
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
-
available
- Overrides:
available
in classFilterInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- Throws:
IOException
-