我写的一个联网的应用,没用什么特殊的代码,,在模拟器上运行正常,可是在真机上连接的时候总是抛出io异常,显示的错误内容是Error in HTTP operation
以下是的我的代码谁能帮我看看呀!另外6255上也有同样的问题!!!
private void createLink(String URLs) throws DDR_Exception
{
try
{
c=(HttpConnection)Connector.open(URLs,Connector.READ,true);
}
catch(SecurityException e)
{
}
catch(IllegalArgumentException e)
{
}
catch(ConnectionNotFoundException e)
{
}
catch(IOException e)
{
}
}
private void openStream() throws DDR_Exception
{
try
{
//is = c.openDataInputStream();
is = new DataInputStream(c.openInputStream());这个时候抛出的![]()
}
catch(IllegalArgumentException e)
{
……
}
private void streamReader() throws DDR_Exception
{
try
{
baos = new ByteArrayOutputStream();
int ch = 0;
while ((ch = is.read())!= -1&&stats==0)
{
baos.write(ch);
}
data = baos.toByteArray();
}
catch(IOException e)
{
}
}
public void linkCall(String URLs) throws DDR_Exception
{
try
{
createLink(URLs);
openStream();
streamReader();
baos.close();
baos = null;
is.close();
is=null;
c.close();
c=null;
}
catch(IOException e)
{
}
finally
{
closeLink();
}
}




