|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.quadrique.jbuildingblocks.core.io.socket.server.JbbHttpRequest
public class JbbHttpRequest
This class is used to manipulate a HTTP request. It is typically used in two ways: - to build an HTTP Request from scratch (with the goal to send it over a socket connection...) - extract an incoming HTTP request from a socket connection (with the goal to access the individual request fields)
| Constructor Summary | |
|---|---|
JbbHttpRequest()
Constructor |
|
| Method Summary | |
|---|---|
void |
extractIncomingHttpRequestInformation(BufferedInputStream zInputStream)
build the instance from the given socket input stream |
byte[] |
getBody()
|
String |
getBodyAsString()
|
int |
getContentLength()
|
String |
getContentType()
|
String |
getHeaderFieldValue(String zHeaderFieldName)
|
String |
getHeaderFieldValues(boolean zIsHtml)
|
String |
getHost()
|
String |
getMethod()
|
int |
getNbOfHeaderFields()
|
int |
getNbOfQueryParameters()
|
String |
getQueryParameterValue(String zQueryParameterName)
|
String |
getQueryParameterValues(boolean zIsHtml)
|
String |
getQueryString()
|
String |
getResource()
|
String |
getUri()
|
String |
getUserAgent()
|
String |
getVersion()
|
static String |
guessContentTypeFromName(String name)
|
boolean |
is10()
|
boolean |
is11()
|
boolean |
isGet()
|
boolean |
isPost()
|
void |
validate()
This method is typically called once a request has been built (either from scratch or from an incoming request on a socket connection) to make sure that the HTTP request is valid |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JbbHttpRequest()
| Method Detail |
|---|
public void extractIncomingHttpRequestInformation(BufferedInputStream zInputStream)
throws Exception
Exception
public void validate()
throws Exception
Exception - if the request is not validpublic String getMethod()
public boolean isGet()
public boolean isPost()
public String getVersion()
public boolean is10()
public boolean is11()
public String getUri()
public String getResource()
public String getQueryString()
public int getNbOfQueryParameters()
public String getQueryParameterValues(boolean zIsHtml)
public String getQueryParameterValue(String zQueryParameterName)
public int getNbOfHeaderFields()
public String getHeaderFieldValues(boolean zIsHtml)
public String getHeaderFieldValue(String zHeaderFieldName)
public String getUserAgent()
public String getHost()
public String getContentType()
public int getContentLength()
throws Exception
Exceptionpublic byte[] getBody()
public String getBodyAsString()
throws Exception
Exceptionpublic static String guessContentTypeFromName(String name)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||