|
Apache Tomcat 7.0.54 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
javax.servlet.ServletInputStream
org.apache.coyote.http11.upgrade.AbstractServletInputStream
public abstract class AbstractServletInputStream
Implements the new Servlet 3.1 methods for ServletInputStream
.
Field Summary | |
---|---|
protected static StringManager |
sm
|
Constructor Summary | |
---|---|
AbstractServletInputStream()
|
Method Summary | |
---|---|
void |
close()
|
protected abstract void |
doClose()
|
protected abstract boolean |
doIsReady()
|
protected abstract int |
doRead(boolean block,
byte[] b,
int off,
int len)
Abstract method to be overridden by concrete implementations. |
protected boolean |
isCloseRequired()
|
boolean |
isFinished()
New Servlet 3.1 method. |
boolean |
isReady()
New Servlet 3.1 method. |
protected void |
onDataAvailable()
|
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
int |
readLine(byte[] b,
int off,
int len)
Reads the input stream, one line at a time. |
void |
setReadListener(ReadListener listener)
New Servlet 3.1 method. |
Methods inherited from class java.io.InputStream |
---|
available, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final StringManager sm
Constructor Detail |
---|
public AbstractServletInputStream()
Method Detail |
---|
public final boolean isFinished()
public final boolean isReady()
public final void setReadListener(ReadListener listener)
public final int read() throws IOException
read
in class InputStream
IOException
public final int readLine(byte[] b, int off, int len) throws IOException
javax.servlet.ServletInputStream
This method returns -1 if it reaches the end of the input stream before reading the maximum number of bytes.
readLine
in class ServletInputStream
b
- an array of bytes into which data is readoff
- an integer specifying the character at which this method
begins readinglen
- an integer specifying the maximum number of bytes to read
IOException
- if an input or output exception has occurredpublic final int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class InputStream
IOException
protected final void onDataAvailable() throws IOException
IOException
protected final boolean isCloseRequired()
protected abstract boolean doIsReady() throws IOException
IOException
protected abstract int doRead(boolean block, byte[] b, int off, int len) throws IOException
IOException
protected abstract void doClose() throws IOException
IOException
|
Apache Tomcat 7.0.54 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |