Class MockServletInputStream
java.lang.Object
java.io.InputStream
jakarta.servlet.ServletInputStream
io.github.cdiunit.internal.servlet5.MockServletInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class MockServletInputStream
extends jakarta.servlet.ServletInputStream
Mock implementation of
ServletInputStream
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
isReady()
int
read()
void
setReadListener
(jakarta.servlet.ReadListener readListener) Methods inherited from class jakarta.servlet.ServletInputStream
readLine
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
Constructor Details
-
MockServletInputStream
public MockServletInputStream(byte[] data)
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
isFinished
public boolean isFinished()- Specified by:
isFinished
in classjakarta.servlet.ServletInputStream
-
isReady
public boolean isReady()- Specified by:
isReady
in classjakarta.servlet.ServletInputStream
-
setReadListener
public void setReadListener(jakarta.servlet.ReadListener readListener) - Specified by:
setReadListener
in classjakarta.servlet.ServletInputStream
-