WAP HttpConnection问题
Java code:
public void run() {
gra.drawString("test",x,y,Graphics.LEFT| Graphics.TOP);
Font font = Font.getFont(Font.FACE_MONOSPACE, Font.STYLE_BOLD,
Font.SIZE_LARGE);
gra.setFont(font);
gra.setColor(0, 0, 0);
gra.drawRect(0, 0, this.getWidth(), this.getHeight());
// TODO Auto-generated method stub
javax.microedition.io.HttpConnection hc = null;
try {
hc = (HttpConnection) Connector
.open("http://110.43.5.66:8678/default.aspx");
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
System.out.println("connected");
System.out.println(hc.getResponseMessage());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
DataInputStream dis = null;
try {
dis = hc.openDataInputStream();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int length = (int)hc.getLength();
byte[] b = new
相关问答:
控件解释到客户端时,自动加了br
换行了,这个可以解决吗?不让他自动加br
<br /> 强制换行
现在问题是,我不想换行
代码如:
<mobile:Image ID="ErrorImage" Runat="server" I ......
我用Server.CreateObject("MSXML2.serverXMLHTTP")来取得网站的源代码,我采集了好几个WAP站,都没问题,可是中国移动的网站却出了问题,我用opera无法访问,但是用手机却可以访问,在手机上用Server.Crea ......
XML 解析失败
XML 解析失败: 语法错误 (行号: 1, 字符: 0)
将文档重解析为 HTML
错误:
missing root element
规范:
http://www.w3.org/TR/REC-xml/
这是在本机上用OPERA打开就出现的问题.在服务器上是好的,请 ......