All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.servlet.http.HttpRequestLine

java.lang.Object
   |
   +----sun.servlet.util.Ascii
           |
           +----sun.servlet.http.HttpRequestLine

public class HttpRequestLine
extends Ascii
This class represents the first line of an HTTP server request.


Variable Index

 o buf
The request line buffer.
 o line
The entire request line.
 o MAXLINE
The maximum size of a request line.
 o method
The request method.
 o params
Hashtable of the name=value pairs encoded in the query string.
 o path
The request path.
 o protocol
The protocol for the request.
 o proxy
Set to true if proxy request.
 o query
The query string for the request.
 o size
The request line buffer size.
 o uri
The request URI.

Constructor Index

 o HttpRequestLine()
Creates a new object with a default request line buffer size.
 o HttpRequestLine(int)
Creates a new object with the specified request line buffer size.

Method Index

 o dump(PrintStream)
Print debug information.
 o getMethod()
Returns the request method.
 o getParameter(String)
Returns the value of the specified query string parameter.
 o getParameterNames()
Returns an enumeration of the query parameter names.
 o getParameters()
Returns the hashtable of query parameters for this request.
 o getProtocol()
Returns the protocol for the request.
 o getQueryString()
Returns the query string for the request.
 o getRequestLine()
Returns the entire request line.
 o getRequestPath()
Get the requst path bytes
 o getURI()
Returns the request URI.
 o isFullRequest()
Returns true if this is a full (i.e.
 o isProxyRequest()
Returns true if this is a proxy request.
 o parse(byte[], int, int)
Parses an HTTP request line from the specified subarray of bytes.
 o parse(ServletInputStream)
Parse a new request line from the specified input stream.
 o reset()
Resets RequestLine object to an uninitialized state.
 o toString()
Returns a string representing the request line.
 o write(OutputStream)
Writes the request line to the specified output stream.

Variables

 o MAXLINE
  protected final static int MAXLINE
The maximum size of a request line.

 o buf
  protected byte buf[]
The request line buffer.

 o size
  protected int size
The request line buffer size.

 o line
  protected final MessageBytes line
The entire request line.

 o method
  protected final MessageBytes method
The request method.

 o uri
  protected final MessageBytes uri
The request URI.

 o path
  protected final MessageBytes path
The request path.

 o query
  protected final MessageBytes query
The query string for the request.

 o protocol
  protected final MessageBytes protocol
The protocol for the request.

 o params
  protected Hashtable params
Hashtable of the name=value pairs encoded in the query string.

 o proxy
  protected boolean proxy
Set to true if proxy request.

Constructors

 o HttpRequestLine
  public HttpRequestLine(int size)
Creates a new object with the specified request line buffer size.

Parameters:
size - the size of the request line buffer
 o HttpRequestLine
  public HttpRequestLine()
Creates a new object with a default request line buffer size.

Methods

 o reset
  public void reset()
Resets RequestLine object to an uninitialized state.

 o parse
  public boolean parse(ServletInputStream in) throws IOException, IllegalArgumentException
Parse a new request line from the specified input stream. Returns true if the line could be read, otherwise returns false if the line could not be read because the end of the stream was reached.

Parameters:
in - the servlet input stream
Throws: IOException
if an I/O error has occurred
Throws: IllegalArgumentException
if the request line was invalid
 o parse
  protected void parse(byte b[],
                       int off,
                       int len) throws IllegalArgumentException
Parses an HTTP request line from the specified subarray of bytes. The line is expected to be terminated with a '\n' character.

Throws: IllegalArgumentException
if the request line was invalid
 o getMethod
  public MessageBytes getMethod()
Returns the request method.

 o getProtocol
  public MessageBytes getProtocol()
Returns the protocol for the request.

 o getQueryString
  public MessageBytes getQueryString()
Returns the query string for the request.

 o getURI
  public MessageBytes getURI()
Returns the request URI.

 o getRequestPath
  public MessageBytes getRequestPath()
Get the requst path bytes

 o getRequestLine
  public MessageBytes getRequestLine()
Returns the entire request line.

 o isFullRequest
  public boolean isFullRequest()
Returns true if this is a full (i.e. not HTTP/0.9) request.

 o isProxyRequest
  public boolean isProxyRequest()
Returns true if this is a proxy request.

 o getParameter
  public String getParameter(String name)
Returns the value of the specified query string parameter.

 o getParameterNames
  public Enumeration getParameterNames()
Returns an enumeration of the query parameter names.

 o getParameters
  protected Hashtable getParameters()
Returns the hashtable of query parameters for this request.

 o toString
  public String toString()
Returns a string representing the request line.

Overrides:
toString in class Object
 o write
  public void write(OutputStream out) throws IOException
Writes the request line to the specified output stream.

Parameters:
out - the output stream
Throws: IOException
if an I/O error has occurred
 o dump
  public void dump(PrintStream out)
Print debug information.


All Packages  Class Hierarchy  This Package  Previous  Next  Index