Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从url编码图像不起作用_Url_Blackberry_Encode_Blackberry Storm - Fatal编程技术网

从url编码图像不起作用

从url编码图像不起作用,url,blackberry,encode,blackberry-storm,Url,Blackberry,Encode,Blackberry Storm,在我的黑莓应用程序中,所有屏幕的横幅图像底部都有广告图像 在模拟器应用程序工作正常,但当我在我的Strom 2 9550应用程序中安装应用程序时,在没有横幅图像的情况下工作正常 我从我的web服务中获取所有的横幅图像URL,但当我试图从URL编码图像以显示在屏幕上时,我无法从URL编码图像,所以应用程序看起来不太好 请参阅下面的编码图像代码 connection = (HttpConnection) Connector.open(bannerImage[i], Connector.READ, t

在我的黑莓应用程序中,所有屏幕的横幅图像底部都有广告图像

在模拟器应用程序工作正常,但当我在我的Strom 2 9550应用程序中安装应用程序时,在没有横幅图像的情况下工作正常

我从我的web服务中获取所有的横幅图像URL,但当我试图从URL编码图像以显示在屏幕上时,我无法从URL编码图像,所以应用程序看起来不太好

请参阅下面的编码图像代码

connection = (HttpConnection) Connector.open(bannerImage[i], Connector.READ, true);  
                                        inputStream = connection.openInputStream();  
                                        byte[] responseData = new byte[10000];  
                                        int length = 0;  
                                        StringBuffer rawResponse = new StringBuffer();  
                                        while (-1 != (length = inputStream.read(responseData)))  
                                        {  
                                         rawResponse.append(new String(responseData, 0, length));  
                                        }  
                                        int responseCode = connection.getResponseCode();
                                        if (responseCode != HttpConnection.HTTP_OK)  
                                        {  
                                            throw new IOException("HTTP response code: "  
                                                    + responseCode);  
                                        }  
                                        final String result = rawResponse.toString();

                                         byte[] dataArray = result.getBytes();  
                                         encodeImageBitmap = EncodedImage.createEncodedImage(dataArray, 0, dataArray.length);

提前谢谢

我得到了这个的ans。当我们使用wifi上网时,我们必须通过:接口
我将这个参数添加到我的图像url中,一切正常。

那么,到底是什么问题?你有例外吗?如果是,是什么?什么时候发生?我们需要更多的细节。我通过wifi上网,所以我认为这就是问题所在。。当在url的末尾添加参数时,这段代码工作得很好。