Package org.vx68k.bitbucket.stub
Class StubServletInputStream
- java.lang.Object
-
- java.io.InputStream
-
- javax.servlet.ServletInputStream
-
- org.vx68k.bitbucket.stub.StubServletInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class StubServletInputStream extends ServletInputStream
Stub implementation ofServletInputStream
which wrapsInputStream
.- Since:
- 5.0
- Author:
- Kaz Nishimura
-
-
Constructor Summary
Constructors Constructor Description StubServletInputStream()
Constructs this object wrapping noInputStream
object.StubServletInputStream(InputStream inputStream, long length)
Constructs this object wrapping anInputStream
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isFinished()
boolean
isReady()
int
read()
void
setReadListener(ReadListener readListener)
-
Methods inherited from class javax.servlet.ServletInputStream
readLine
-
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
StubServletInputStream
public StubServletInputStream()
Constructs this object wrapping noInputStream
object.
-
StubServletInputStream
public StubServletInputStream(InputStream inputStream, long length)
Constructs this object wrapping anInputStream
object.- Parameters:
inputStream
-InputStream
object to wrap, ornull
length
- length of the input stream
-
-
Method Detail
-
isFinished
public final boolean isFinished()
- Specified by:
isFinished
in classServletInputStream
-
isReady
public final boolean isReady()
- Specified by:
isReady
in classServletInputStream
-
setReadListener
public void setReadListener(ReadListener readListener)
- Specified by:
setReadListener
in classServletInputStream
-
read
public final int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
-