Class MaxSizeInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
eu.europa.esig.dss.spi.client.http.MaxSizeInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class MaxSizeInputStream extends FilterInputStream
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
  • Constructor Details

    • MaxSizeInputStream

      public MaxSizeInputStream(InputStream wrappedStream, int maxSize, String url)
      The default constructor for NativeHTTPDataLoader.MaxSizeInputStream.
      Parameters:
      wrappedStream - the wrapped stream
      maxSize - the maximum size to read
      url - the url source
  • Method Details