(真是有中國特色的J2ME編程啊……-_-!)
/**
* sample code of http connecting via CMWAP
* @author clapton_xpAThotmailDOTcom
* assume that you gonna connect to http://www.yourdomain.com/yourdir/your.file
*/
String CMCC_PROXY="http://10.0.0.172:80/"; //這個是中國移動的代理
HttpConnection c = null;
c = (HttpConnection) Connector.open(CMCC_PROXY+"yourdir/your.file");
c.setRequestProperty("X-Online-Host", "www.yourdomain.com"); //這個是關鍵所在
// deal with connection
is = c.openInputStream();
//..............後面都一樣了