|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.dctl.j2me.io.ProtocolString
Parse the protocol string
| Field Summary | |
java.lang.String |
address
The address string |
java.lang.String |
location
The location |
java.lang.String |
parameters
The parameter strings |
int |
port
The port number |
java.lang.String |
protocol
The protocol string |
java.lang.String |
query
The query string |
java.lang.String |
ref
The reference string |
java.lang.String |
url
The complete url |
| Constructor Summary | |
ProtocolString()
Create a protocol string with blank entries |
|
ProtocolString(java.lang.String url)
Create a protocol string from the URL and set the protocol, address, port, location and parameter values |
|
| Method Summary | |
java.lang.String |
getQueryParam(java.lang.String p)
Gets the value of a url query parameter as a string, e.g. if a query part of a url were &size=10 the method would
return 10 when passed the argument size. |
void |
parseURL(java.lang.String url)
Parse the URL and set the protocol, address, port, location and parameter values |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.lang.String url
public java.lang.String protocol
public java.lang.String address
public int port
public java.lang.String location
public java.lang.String parameters
public java.lang.String ref
public java.lang.String query
| Constructor Detail |
public ProtocolString()
public ProtocolString(java.lang.String url)
url - The URL in the format IllegalArgumentException - if the url cannot be decoded| Method Detail |
public void parseURL(java.lang.String url)
url - The URL in the format IllegalArgumentException - if the url cannot be decodedpublic final java.lang.String getQueryParam(java.lang.String p)
&size=10 the method would
return 10 when passed the argument size.
The method is case sensitive and passing in a non-matching string will
return null. The method also assumes that the query is the last part of
a url. The first query in a url is preceeded with a ? as
opposed to a &.
p - the parameter string - the convention is for this always to be lower-case
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||