| java.lang.Object java.io.InputStream com.quadcap.net.server.WorkerInputStream
WorkerInputStream | final public class WorkerInputStream extends InputStream (Code) | | An efficient worker input stream, which supports recycling.
Additionally, this class performs all necessary buffering and
some other higher level functions on the socket input stream, so
no extra 'buffered' are needed.
In a violoation of layering, but to achieve maximum performance,
this class knows how to "parse" HTTP headers.
author: Stan Bailes |
Method Summary | |
final public void | close() | final boolean | fill() Fill the buffer. | final public int | read() | final public int | read(byte[] b, int off, int len) | final public int | read(byte[] b) | final public int | readHeaders(byte[] hbuf, int[] offsets) Read HTTP readers from the input stream. | final public void | reset(InputStream in) | final void | show(String s, int p) | public String | toString() | public void | unread(int c) |
doTrace | static boolean doTrace(Code) | | |
fill | final boolean fill() throws IOException(Code) | | Fill the buffer. Return true unless we're at end of file and have
returned zero bytes in this fill
|
readHeaders | final public int readHeaders(byte[] hbuf, int[] offsets) throws IOException(Code) | | Read HTTP readers from the input stream.
Parameters: hbuf - We place the entire header octet sequence into hbuf,terminated with CRLF Parameters: offsets - We place the byte offset of the start of eachheader into the offsets array the number of headers found |
unread | public void unread(int c)(Code) | | |
|
|