public class ServletIntputStreamAdapter extends ServletInputStream
Constructor and Description |
---|
ServletIntputStreamAdapter(java.io.InputStream is) |
Modifier and Type | Method and Description |
---|---|
boolean |
isFinished()
Returns true when all the data from the stream has been read else
it returns false.
|
boolean |
isReady()
Returns true if data can be read without blocking else returns
false.
|
int |
read() |
void |
setReadListener(ReadListener listener)
Instructs the
ServletInputStream to invoke the provided
ReadListener when it is possible to read |
readLine
public ServletIntputStreamAdapter(java.io.InputStream is)
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public boolean isFinished()
ServletInputStream
isFinished
in class ServletInputStream
true
when all data for this particular request
has been read, otherwise returns false
.public boolean isReady()
ServletInputStream
isReady
in class ServletInputStream
true
if data can be obtained without blocking,
otherwise returns false
.public void setReadListener(ReadListener listener)
ServletInputStream
ServletInputStream
to invoke the provided
ReadListener
when it is possible to readsetReadListener
in class ServletInputStream
listener
- the ReadListener
that should be notified
when it's possible to read.