org.apache.tomcat.modules.server
Class Http10
java.lang.Object
|
+--org.apache.tomcat.modules.server.Http10
- public class Http10
- extends java.lang.Object
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 |
sout
protected java.io.OutputStream sout
DEFAULT_HEAD_BUFFER_SIZE
protected static final int DEFAULT_HEAD_BUFFER_SIZE
oBuffer
protected byte[] oBuffer
oBufferCount
protected int oBufferCount
Http10
public Http10()
setSocket
public void setSocket(java.net.Socket socket)
throws java.io.IOException
recycle
public void recycle()
doRead
public int doRead()
throws java.io.IOException
doRead
public int doRead(byte[] b,
int off,
int len)
throws java.io.IOException
readHeaders
public int readHeaders(MimeHeaders headers)
throws java.io.IOException
- Reads header fields from the specified servlet input stream until
a blank line is encountered.
- Parameters:
in
- the servlet input stream- Throws:
java.lang.IllegalArgumentException
- if the header format was invalidjava.io.IOException
- if an I/O error has occurred
parseHeaderField
public final boolean parseHeaderField(MimeHeaders headers,
byte[] b,
int off,
int len)
- Parses a header field from a subarray of bytes.
- Parameters:
b
- the bytes to parseoff
- the start offset of the byteslen
- the length of the bytes- Throws:
java.lang.IllegalArgumentException
- if the header format was invalid
processRequestLine
public final int processRequestLine(MessageBytes methodMB,
MessageBytes uriMB,
MessageBytes queryMB,
MessageBytes protocolMB)
throws java.io.IOException
- Parse a request line
sendHeaders
public void sendHeaders(MimeHeaders headers)
throws java.io.IOException
- Format and send the output headers
sendStatus
public void sendStatus(int status,
java.lang.String message)
throws java.io.IOException
- Needed for AJP support - the only difference between AJP response and
HTTP response is the status line
doWrite
public void doWrite(byte[] buffer,
int pos,
int count)
throws java.io.IOException
readLine
public int readLine(java.io.InputStream in,
byte[] b,
int off,
int len)
throws java.io.IOException
printHead
public void printHead(java.lang.String s)
Copyright © 2001 Apache Software Foundation. All Rights Reserved.