public class UpgradeServletInputStream extends ServletInputStream
| Constructor and Description |
|---|
UpgradeServletInputStream(StreamSourceChannel channel,
ByteBufferPool bufferPool,
Executor ioExecutor) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
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() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
setReadListener(ReadListener readListener)
Instructs the
ServletInputStream to invoke the provided
ReadListener when it is possible to read |
readLinemark, markSupported, reset, skippublic UpgradeServletInputStream(StreamSourceChannel channel, ByteBufferPool bufferPool, Executor ioExecutor)
public boolean isFinished()
ServletInputStreamisFinished in class ServletInputStreamtrue when all data for this particular request
has been read, otherwise returns false.public boolean isReady()
ServletInputStreamisReady in class ServletInputStreamtrue if data can be obtained without blocking,
otherwise returns false.public void setReadListener(ReadListener readListener)
ServletInputStreamServletInputStream to invoke the provided
ReadListener when it is possible to readsetReadListener in class ServletInputStreamreadListener - the ReadListener that should be notified
when it's possible to read.public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.