|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.browser.ProtocolHandler
de.enough.polish.browser.protocols.HttpProtocolHandler
public class HttpProtocolHandler
Protocol handler class to handle HTTP.
The sent user agent is normally the string defined in the
microedition.platform system property. You can overwrite
this value by defining the polish.Browser.UserAgent variable
in your build.xml.
| Field Summary |
|---|
| Fields inherited from class de.enough.polish.browser.ProtocolHandler |
|---|
bytebuf, protocolName |
| Constructor Summary | |
|---|---|
HttpProtocolHandler()
Creates a new HttpProtocolHandler object with "http" as it's protocol. |
|
HttpProtocolHandler(HashMap requestProperties)
Creates a new HttpProtocolHandler object with "http" as it's protocol. |
|
HttpProtocolHandler(String protocolName)
Creates a new HttpProtocolHandler object. |
|
HttpProtocolHandler(String protocolName,
HashMap requestProperties)
Creates a new HttpProtocolHandler object. |
|
| Method Summary | |
|---|---|
StreamConnection |
getConnection(String url)
Creates a StreamConnection for the given url. |
static String |
getUserAgent()
Returns the user agent string |
static void |
setUserAgent(String userAgent)
Sets the USER_AGENT string used for the request header |
| Methods inherited from class de.enough.polish.browser.ProtocolHandler |
|---|
getProtocolName, readByteArrayFromStream, stripProtocol |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpProtocolHandler()
public HttpProtocolHandler(HashMap requestProperties)
requestProperties - the request properties to use for each requestpublic HttpProtocolHandler(String protocolName)
protocolName - the protocolname (usually "http" or "https")
public HttpProtocolHandler(String protocolName,
HashMap requestProperties)
protocolName - the protocolname (usually "http" or "https")requestProperties - the request properties to use for each request| Method Detail |
|---|
public static void setUserAgent(String userAgent)
userAgent - the USER_AGENT string to setpublic static String getUserAgent()
public StreamConnection getConnection(String url)
throws IOException
ProtocolHandlerStreamConnection for the given url.
getConnection in class ProtocolHandlerurl - the url
IOException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||