|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.lwuit.html.DocumentInfo
public class DocumentInfo
DocumentInfo holds important information about a document that is loading. This class is constructed internally by HTMLComponent and HTMLForm and is sent to the RequestHandler. It is intended for the RequestHandler to use and update (For example update encoding according to the HTTP response, update URL in case of a redirect etc.)
Field Summary | |
---|---|
static java.lang.String |
ENCODING_ISO
ISO-8859-1 encoding, the default one |
static java.lang.String |
ENCODING_UTF8
UTF8 encoding, very common |
static int |
TYPE_CSS
Indicates that the request is for a CSS file |
static int |
TYPE_HTML
Indicates that the request is for a page |
static int |
TYPE_IMAGE
Indicates that the request is for an image |
Method Summary | |
---|---|
java.lang.String |
getBaseURL()
Returns the base URL for this document |
java.lang.String |
getEncoding()
Returns a string describing the document's encoding |
int |
getExpectedContentType()
Returns the expected content type, one of TYPE_HTML, TYPE_IMAGE or TYPE_CSS |
java.lang.String |
getFullUrl()
Returns the full url string including parameters in GET request |
java.lang.String |
getParams()
Returns the request paramter as an percentage-encoded string |
java.lang.String |
getUrl()
Returns the absolute URL associated with this DocumentInfo object |
boolean |
isPostRequest()
Returns whether this document request is a POST request or not |
void |
setBaseURL(java.lang.String baseURL)
Sets the base URL for this document. |
void |
setEncoding(java.lang.String encoding)
Sets the document encoding (This can be determined via the charset attribute in the response) |
void |
setExpectedContentType(int requestType)
Sets this expected content type to be either TYPE_HTML, TYPE_IMAGE or TYPE_CSS When the document itself is requested the type will be TYPE_HTML and when images in the document are requested the type will be TYPE_IMAGE The differentiation is important to handle cases in which the HTMLComponent expects one type but the URL is has a resource of another type |
void |
setParams(java.lang.String params)
Sets the request paramters of this request |
void |
setPostRequest(boolean postRequest)
Sets this DocumentInfo as using a POST request or not |
void |
setUrl(java.lang.String url)
Sets the URL to the specified URL |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ENCODING_ISO
public static final java.lang.String ENCODING_UTF8
public static int TYPE_HTML
public static int TYPE_IMAGE
public static int TYPE_CSS
Method Detail |
---|
public java.lang.String getUrl()
public java.lang.String getFullUrl()
public void setUrl(java.lang.String url)
url
- the URL to set as the URL of the documentpublic int getExpectedContentType()
public void setExpectedContentType(int requestType)
requestType
- the requestType to set, one of TYPE_HTML, TYPE_IMAGE or TYPE_CSSpublic boolean isPostRequest()
public void setPostRequest(boolean postRequest)
postRequest
- true if this is a POST request, false otherwisepublic java.lang.String getParams()
public void setParams(java.lang.String params)
params
- The request paramters to set, should be as a percentage encoded stringpublic java.lang.String getEncoding()
public void setEncoding(java.lang.String encoding)
encoding
- the encoding to set. It is recommended to use the ENCODING_* constants when possible to avoid typospublic java.lang.String getBaseURL()
public void setBaseURL(java.lang.String baseURL)
baseURL
- the baseURL to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |