Class MaxSizeInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
eu.europa.esig.dss.spi.client.http.MaxSizeInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Used to limit the size of fetched data. Throws
IOException
if the data limit has been reached.
Inspired by org.apache.commons.fileupload.util.LimitedInputStream
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorDescriptionMaxSizeInputStream
(InputStream wrappedStream, int maxSize, String url) The default constructor for NativeHTTPDataLoader.MaxSizeInputStream. -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
-
Constructor Details
-
MaxSizeInputStream
The default constructor for NativeHTTPDataLoader.MaxSizeInputStream.- Parameters:
wrappedStream
- the wrapped streammaxSize
- the maximum size to readurl
- the url source
-
-
Method Details
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-