|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream | +--org.apache.catalina.connector.http.SocketInputStream
Extends InputStream to be more efficient reading lines during HTTP header processing.
Field Summary | |
protected byte[] |
buf
Internal buffer. |
protected int |
count
Last valid byte. |
protected java.io.InputStream |
is
Underlying input stream. |
protected int |
pos
Position in the buffer. |
protected static StringManager |
sm
The string manager for this package. |
Constructor Summary | |
SocketInputStream(java.io.InputStream is,
int bufferSize)
Construct a servlet input stream associated with the specified socket input. |
Method Summary | |
int |
available()
Returns the number of bytes that can be read from this input stream without blocking. |
void |
close()
Close the input stream. |
protected void |
fill()
Fill the internal buffer using data from the undelying input stream. |
int |
read()
Read byte. |
void |
readHeader(org.apache.catalina.connector.http.HttpHeader header)
Read a header, and copies it to the given buffer. |
void |
readRequestLine(org.apache.catalina.connector.http.HttpRequestLine requestLine)
Read the request line, and copies it to the given buffer. |
Methods inherited from class java.io.InputStream |
mark,
markSupported,
read,
read,
reset,
skip |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected byte[] buf
protected int count
protected int pos
protected java.io.InputStream is
protected static StringManager sm
Constructor Detail |
public SocketInputStream(java.io.InputStream is, int bufferSize)
is
- socket input streambufferSize
- size of the internal bufferMethod Detail |
public void readRequestLine(org.apache.catalina.connector.http.HttpRequestLine requestLine) throws java.io.IOException
requestLine
- Request line objectpublic void readHeader(org.apache.catalina.connector.http.HttpHeader header) throws java.io.IOException
requestLine
- Request line objectpublic int read() throws java.io.IOException
public int available() throws java.io.IOException
public void close() throws java.io.IOException
protected void fill() throws java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |