Class ResettableServletInputStream
- java.lang.Object
-
- java.io.InputStream
-
- javax.servlet.ServletInputStream
-
- org.hawaiiframework.logging.web.filter.ResettableServletInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ResettableServletInputStream extends javax.servlet.ServletInputStreamInput stream that can be 'reset', that is, the stream can be reset by supplying the (original) data again.- Since:
- 2.0.0
- Author:
- Rutger Lubbers
-
-
Constructor Summary
Constructors Constructor Description ResettableServletInputStream(byte[] rawData)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisFinished()booleanisReady()intread()voidreset()Set the input to use for the stream.voidsetReadListener(javax.servlet.ReadListener listener)-
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, skip, transferTo
-
-
-
-
Method Detail
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
isFinished
public boolean isFinished()
- Specified by:
isFinishedin classjavax.servlet.ServletInputStream
-
isReady
public boolean isReady()
- Specified by:
isReadyin classjavax.servlet.ServletInputStream
-
setReadListener
public void setReadListener(javax.servlet.ReadListener listener)
- Specified by:
setReadListenerin classjavax.servlet.ServletInputStream
-
reset
public void reset() throws IOExceptionSet the input to use for the stream.- Overrides:
resetin classInputStream- Throws:
IOException
-
-