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
ConstructorsConstructorDescriptionMaxSizeInputStream(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, skipMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
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:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-