kom.tools.web
Interface HTTPRequestParser

All Known Implementing Classes:
POSTResponse

public interface HTTPRequestParser

Parser for HTTP requests


Method Summary
 void finalize()
          Removes the temporary request file
 java.lang.String get(java.lang.String name)
          Gets the value of a parameter contained in the request.
 java.lang.String[] getValues(java.lang.String name)
          Gets all values for a key
 java.util.Enumeration names()
          Returns all parameter names
 void parse()
          Parses the request
 void parseURI(java.lang.String uri)
          Parses a URI for name/value pairs
 void put(java.lang.String param, int value)
          Saves param name + int value
 void put(java.lang.String param, java.lang.String value)
          Saves param name + string value
 void uploadFileData(java.lang.String mime, java.lang.String name, java.lang.String filename)
           
 

Method Detail

finalize

public void finalize()
Removes the temporary request file
Overrides:
finalize in class java.lang.Object

parse

public void parse()
Parses the request

parseURI

public void parseURI(java.lang.String uri)
Parses a URI for name/value pairs
Parameters:
uri - String

uploadFileData

public void uploadFileData(java.lang.String mime,
                           java.lang.String name,
                           java.lang.String filename)

put

public void put(java.lang.String param,
                java.lang.String value)
Saves param name + string value

put

public void put(java.lang.String param,
                int value)
Saves param name + int value

get

public java.lang.String get(java.lang.String name)
Gets the value of a parameter contained in the request.
Parameters:
name - the name of the parameter to retrieve
Returns:
the value of the parameter

names

public java.util.Enumeration names()
Returns all parameter names

getValues

public java.lang.String[] getValues(java.lang.String name)
Gets all values for a key