ro.polak.webserver
Class HTTPRequestHeaders

java.lang.Object
  extended by ro.polak.utilities.AttributeList
      extended by ro.polak.webserver.Headers
          extended by ro.polak.webserver.HTTPRequestHeaders
All Implemented Interfaces:
java.io.Serializable

public class HTTPRequestHeaders
extends Headers

HTTP request headers representation

Java Little Web Server Homepage

Version:
1.0/21.02.2008
Author:
Piotr Polak www.polak.ro
See Also:
Serialized Form

Constructor Summary
HTTPRequestHeaders()
           
 
Method Summary
 java.lang.String _get(java.lang.String attributeName)
          Returns specified GET attribute
 java.lang.String _post(java.lang.String attributeName)
          Returns specified POST attribute
 java.lang.String getMethod()
          Returns the method of the request
 java.lang.String getProtocol()
          Returns request protocol
 java.lang.String getQueryString()
          Returns decoded query string
 java.lang.String getReferer()
          Returns request referer
 java.lang.String getURI()
          Returns requested URI
 void setPost(AttributeList _post)
          Sets post as AttributeList
 void setPostAttribute(java.lang.String attributeName, java.lang.String attributeValue)
          Sets a single POST atribute
 void setPostLine(java.lang.String rawPostLine)
          Sets and parses POST parameters line
 void setStatusLine(java.lang.String status)
          Sets the status line
 
Methods inherited from class ro.polak.webserver.Headers
getHeader, getStatus, parse, setHeader, toString
 
Methods inherited from class ro.polak.utilities.AttributeList
get, getNameAt, getValueAt, set, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTTPRequestHeaders

public HTTPRequestHeaders()
Method Detail

setStatusLine

public void setStatusLine(java.lang.String status)
Sets the status line

Parameters:
status - raw status line

setPostLine

public void setPostLine(java.lang.String rawPostLine)
Sets and parses POST parameters line

Parameters:
postParameters - POST parameters line

setPost

public void setPost(AttributeList _post)
Sets post as AttributeList

Parameters:
_post - POST AttributeList

setPostAttribute

public void setPostAttribute(java.lang.String attributeName,
                             java.lang.String attributeValue)
Sets a single POST atribute

Parameters:
paramName -
paramValue -

getMethod

public java.lang.String getMethod()
Returns the method of the request

Returns:
method of the request

getURI

public java.lang.String getURI()
Returns requested URI

Returns:
requested URI

getQueryString

public java.lang.String getQueryString()
Returns decoded query string

Returns:
decoded query string

getProtocol

public java.lang.String getProtocol()
Returns request protocol

Returns:
request protocol

getReferer

public java.lang.String getReferer()
Returns request referer

Returns:
request referer

_get

public java.lang.String _get(java.lang.String attributeName)
Returns specified GET attribute

Parameters:
attributeName - name of the attribute
Returns:
specified GET attribute

_post

public java.lang.String _post(java.lang.String attributeName)
Returns specified POST attribute

Parameters:
attributeName - name of the attribute
Returns:
specified POST attribute