Class BoundedInputStream
java.lang.Object
java.io.InputStream
ecmwf.common.technical.BoundedInputStream
-
Constructor Summary
ConstructorsConstructorDescriptionBoundedInputStream
(InputStream data, long maxBytes) Initializes a newBoundedInputStream
with the specified underlying stream and byte limit. -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
BoundedInputStream
Initializes a newBoundedInputStream
with the specified underlying stream and byte limit.- Parameters:
data
- the @{code InputStream} serving as the source of this one's datamaxBytes
- the maximum number of bytes this stream will deliver before signaling end-of-data
-
-
Method Details
-
available
Available.- Overrides:
available
in classInputStream
- Throws:
IOException
-
close
Close.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
mark
-
markSupported
-
read
Read.- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
Read.- Overrides:
read
in classInputStream
- Throws:
IOException
-
reset
Reset.- Overrides:
reset
in classInputStream
- Throws:
IOException
-
skip
Skip.- Overrides:
skip
in classInputStream
- Throws:
IOException
-
read
Read.- Specified by:
read
in classInputStream
- Throws:
IOException
-