Package net.solarnetwork.central.web
Class MaxUploadSizeInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.io.input.BoundedInputStream
net.solarnetwork.central.web.MaxUploadSizeInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
public class MaxUploadSizeInputStream
extends org.apache.commons.io.input.BoundedInputStream
Bounded input stream that throws a when
reading beyond the configured maximum length.
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionMaxUploadSizeInputStream(InputStream inputStream, long maxLength) Constructor. -
Method Summary
Methods inherited from class org.apache.commons.io.input.BoundedInputStream
available, close, getCount, getMaxLength, isPropagateClose, mark, markSupported, read, read, read, reset, setPropagateClose, skip, toStringMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
MaxUploadSizeInputStream
Constructor.- Parameters:
inputStream- the stream to wrapmaxLength- the maximum length
-
-
Method Details
-
onMaxLength
- Overrides:
onMaxLengthin classorg.apache.commons.io.input.BoundedInputStream- Throws:
IOException
-