|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.sysadm.SysAdminRequest
This class is a carrier of request information to SysAdmin program. Instances contain information about the request (I.e. CGI environment values) and an input stream reference.
Field Summary | |
private static int |
BUFSIZ
|
private Properties |
cgiData
|
private EncodingConverter |
encoder
|
private Properties |
formData
|
private InputStream |
inputStream
|
private static boolean |
REQUEST_URI_DECODE
Some webservers are appearing to decoding the RequestURI prior to passing it to the servlet engine. |
static boolean |
VERBOSE
|
private static String |
versionID
|
Constructor Summary | |
SysAdminRequest(Properties cgi_data,
InputStream input_stream)
Public Constructor. |
Method Summary | |
private void |
fixCgiData()
|
String |
getBaseURL()
Determine the Base URL of this script. |
Properties |
getFormData()
Retrieves the FORM data from the incoming input stream as x-www-form-urlencoded data. |
String |
getFullURL()
Determine the Full URL of this script. |
InputStream |
getInputStream()
Gets the input stream associated with this SysAdmin object. |
String |
getMultiPartBoundary(String ContentType)
Utility routine to parse out the multipart object-body boundary |
String |
getProperty(String key)
Public getter method for access to CGI data. |
String |
getProperty(String key,
String default_value)
Public getter method for access to CGI data. |
Enumeration |
getPropertyKeys()
Public getter method for access to CGI data keys. |
boolean |
isGetRequest()
Determine if the REQUEST_METHOD used to send the data from the browser was the GET method. |
boolean |
isPostRequest()
Determine if the REQUEST_METHOD used to send the data from the browser was the POST method. |
boolean |
isUrlencodedContent()
Determine if the CONTENT_TYPE used to send the data from the browser was urlencoded form data. |
void |
listProperties(PrintWriter out)
Public lister method for debug access to CGI data. |
static void |
main(String[] args)
The main routine is included here as a test driver. |
PrintWriter |
newPrintWriter(OutputStream output_stream)
Utility routine to construct a buffered PrintWriter from an OutputStream. |
void |
printFormDataHTML(PrintWriter out)
Print all of the form data using HTML. |
void |
printHTMLBottom(PrintWriter out)
Generate some vanilla HTML that you usually want to include at the bottom of any HTML page you generate. |
void |
printHTMLHeader(PrintWriter out)
Print a standard HTTP HTML header. |
void |
printHTMLTop(PrintWriter out,
String title)
Generate some vanilla HTML that you usually want to include at the top of any HTML page you generate. |
void |
printHTMLTop(PrintWriter out,
String title,
String doc_base,
String[] body_tags)
Generate some vanilla HTML that you usually want to include at the top of any HTML page you generate. |
void |
printPropertiesHTML(PrintWriter out)
Print all of the CGI properties and the associated values using HTML. |
private String |
readQueryString(InputStream input_stream)
Reads the query string from the incoming input stream. |
Properties |
splitQueryString(String query_string)
Splits the URLs query string into name value pairs based on the ampersand and equal character tokens. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String versionID
private static final int BUFSIZ
public static boolean VERBOSE
private Properties cgiData
private Properties formData
private InputStream inputStream
private EncodingConverter encoder
private static boolean REQUEST_URI_DECODE
Constructor Detail |
public SysAdminRequest(Properties cgi_data, InputStream input_stream)
cgi_data
- Properties object of http headersMethod Detail |
private void fixCgiData()
public InputStream getInputStream()
private String readQueryString(InputStream input_stream)
public Properties getFormData()
public Properties splitQueryString(String query_string)
public boolean isGetRequest()
public boolean isPostRequest()
public boolean isUrlencodedContent()
public String getBaseURL()
public String getFullURL()
public String getProperty(String key)
public Enumeration getPropertyKeys()
public void listProperties(PrintWriter out)
public String getProperty(String key, String default_value)
public void printHTMLHeader(PrintWriter out) throws IOException
out
- PrintWriter to receive output.
IOException
public void printHTMLTop(PrintWriter out, String title, String doc_base, String[] body_tags) throws IOException
out
- PrintWriter to receive output.
IOException
public void printHTMLTop(PrintWriter out, String title) throws IOException
out
- PrintWriter to receive output.
IOException
public void printHTMLBottom(PrintWriter out) throws IOException
out
- PrintWriter to receive output.
IOException
public void printPropertiesHTML(PrintWriter out) throws IOException
out
- PrintWriter to receive output.
IOException
public void printFormDataHTML(PrintWriter out) throws IOException
out
- PrintWriter to receive output.
IOException
public PrintWriter newPrintWriter(OutputStream output_stream)
output_stream
- OutputStream to be wrapped
public String getMultiPartBoundary(String ContentType)
ContentType
- String containing the content-type and boundary,
separated by a semi-colon
public static void main(String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |