org.apache.tomcat.modules.server
Class Http10

java.lang.Object
  extended byorg.apache.tomcat.modules.server.Http10

public class Http10
extends java.lang.Object


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

sout

protected java.io.OutputStream sout

DEFAULT_HEAD_BUFFER_SIZE

protected static final int DEFAULT_HEAD_BUFFER_SIZE
See Also:
Constant Field Values

oBuffer

protected byte[] oBuffer

oBufferCount

protected int oBufferCount
Constructor Detail

Http10

public Http10()
Method Detail

setSocket

public void setSocket(java.net.Socket socket)
               throws java.io.IOException
Throws:
java.io.IOException

recycle

public void recycle()

doRead

public int doRead()
           throws java.io.IOException
Throws:
java.io.IOException

doRead

public int doRead(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
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.

Throws:
java.lang.IllegalArgumentException - if the header format was invalid
java.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 parse
off - the start offset of the bytes
len - 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

Throws:
java.io.IOException

sendHeaders

public void sendHeaders(MimeHeaders headers)
                 throws java.io.IOException
Format and send the output headers

Throws:
java.io.IOException

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

Throws:
java.io.IOException

doWrite

public void doWrite(byte[] buffer,
                    int pos,
                    int count)
             throws java.io.IOException
Throws:
java.io.IOException

readLine

public int readLine(java.io.InputStream in,
                    byte[] b,
                    int off,
                    int len)
             throws java.io.IOException
Throws:
java.io.IOException

printHead

public void printHead(java.lang.String s)


Copyright ? 2001 Apache Software Foundation. All Rights Reserved.