|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tomcat.modules.server.Http10
Field Summary | |
protected static int |
DEFAULT_HEAD_BUFFER_SIZE
|
protected byte[] |
oBuffer
|
protected int |
oBufferCount
|
protected java.io.OutputStream |
sout
|
Constructor Summary | |
Http10()
|
Method Summary | |
int |
doRead()
|
int |
doRead(byte[] b,
int off,
int len)
|
void |
doWrite(byte[] buffer,
int pos,
int count)
|
boolean |
parseHeaderField(MimeHeaders headers,
byte[] b,
int off,
int len)
Parses a header field from a subarray of bytes. |
void |
printHead(java.lang.String s)
|
int |
processRequestLine(MessageBytes methodMB,
MessageBytes uriMB,
MessageBytes queryMB,
MessageBytes protocolMB)
Parse a request line |
int |
readHeaders(MimeHeaders headers)
Reads header fields from the specified servlet input stream until a blank line is encountered. |
int |
readLine(java.io.InputStream in,
byte[] b,
int off,
int len)
|
void |
recycle()
|
void |
sendHeaders(MimeHeaders headers)
Format and send the output headers |
void |
sendStatus(int status,
java.lang.String message)
Needed for AJP support - the only difference between AJP response and HTTP response is the status line |
void |
setSocket(java.net.Socket socket)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.OutputStream sout
protected static final int DEFAULT_HEAD_BUFFER_SIZE
protected byte[] oBuffer
protected int oBufferCount
Constructor Detail |
public Http10()
Method Detail |
public void setSocket(java.net.Socket socket) throws java.io.IOException
java.io.IOException
public void recycle()
public int doRead() throws java.io.IOException
java.io.IOException
public int doRead(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
public int readHeaders(MimeHeaders headers) throws java.io.IOException
java.lang.IllegalArgumentException
- if the header format was invalid
java.io.IOException
- if an I/O error has occurredpublic final boolean parseHeaderField(MimeHeaders headers, byte[] b, int off, int len)
b
- the bytes to parseoff
- the start offset of the byteslen
- the length of the bytes
java.lang.IllegalArgumentException
- if the header format was invalidpublic final int processRequestLine(MessageBytes methodMB, MessageBytes uriMB, MessageBytes queryMB, MessageBytes protocolMB) throws java.io.IOException
java.io.IOException
public void sendHeaders(MimeHeaders headers) throws java.io.IOException
java.io.IOException
public void sendStatus(int status, java.lang.String message) throws java.io.IOException
java.io.IOException
public void doWrite(byte[] buffer, int pos, int count) throws java.io.IOException
java.io.IOException
public int readLine(java.io.InputStream in, byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
public void printHead(java.lang.String s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |