Package org.apache.juneau.rest.util
Class BoundedServletInputStream
java.lang.Object
java.io.InputStream
jakarta.servlet.ServletInputStream
org.apache.juneau.rest.util.BoundedServletInputStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable
ServletInputStream wrapper around a normal input stream with support for limiting input.
 
See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionBoundedServletInputStream(byte[] b) Wraps the specified byte array.BoundedServletInputStream(jakarta.servlet.ServletInputStream sis, long max) Wraps the specified input stream.BoundedServletInputStream(InputStream is, long max) Wraps the specified input stream.
- 
Method SummaryMethods inherited from class jakarta.servlet.ServletInputStreamread, readAllBytes, readLine, readNBytes, readNBytesMethods inherited from class java.io.InputStreamnullInputStream, skipNBytes, transferTo
- 
Constructor Details- 
BoundedServletInputStreamWraps the specified input stream.- Parameters:
- is- The input stream to wrap.
- max- The maximum number of bytes to read from the stream.
 
- 
BoundedServletInputStreamWraps the specified input stream.- Parameters:
- sis- The input stream to wrap.
- max- The maximum number of bytes to read from the stream.
 
- 
BoundedServletInputStreamWraps the specified byte array.- Parameters:
- b- The byte contents of the stream.
 
 
- 
- 
Method Details- 
read- Specified by:
- readin class- InputStream
- Throws:
- IOException
 
- 
read- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
- 
read- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
- 
skip- Overrides:
- skipin class- InputStream
- Throws:
- IOException
 
- 
available- Overrides:
- availablein class- InputStream
- Throws:
- IOException
 
- 
reset- Overrides:
- resetin class- InputStream
- Throws:
- IOException
 
- 
mark- Overrides:
- markin class- InputStream
 
- 
markSupported- Overrides:
- markSupportedin class- InputStream
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
- Throws:
- IOException
 
- 
isFinished- Specified by:
- isFinishedin class- jakarta.servlet.ServletInputStream
 
- 
isReady- Specified by:
- isReadyin class- jakarta.servlet.ServletInputStream
 
- 
setReadListener- Specified by:
- setReadListenerin class- jakarta.servlet.ServletInputStream
 
 
-