0
이것은 연결 문제가 발생하는 곳의 코드입니다. HttpConnection
은 입력 스트림에서 연결 obj로부터 응답을받지 못합니다.HttpConnection 메시지에서 Blackberry의 오류가 데이터 그램 (ConnectionBase) 수신. 데이터 그램 행 538
Datagram(ConnectionBase).receive (Datagram)
라인 도움이 될 예외를 게시 538
HttpConnection httpCon = null;
InputStream iStream = null;
String url = null;
String result = "";
public GetXmlHttp(String str)
{
url=str;
}
public String RESULT()
{
try
{
httpCon = (HttpConnection)Connector.open(url);
httpCon.setRequestMethod(HttpConnection.GET);
iStream = httpCon.openInputStream();//error is here
int httpResponse = httpCon.getResponseCode();
System.out.println("httpResponse code"+httpResponse);
System.out.println(httpResponse);
if(httpResponse != 200)
return null;
InputStreamReader in = new InputStreamReader(iStream);
StringBuffer sb=new StringBuffer();
char[] ch=new char[1020];
while(in.read(ch)!=-1)
{
sb.append(ch);
}
}
}
예외를 게시하십시오. –