내가 연결 HTTPS를 내가 연결을 설정할 수라고 생각HTTPS 연결
HttpsConnection httpConnector = null;
InputStream in = null;
Document doc ;
String content = "";
try
{
httpConnector = (HttpsConnection)Connector.open(url,Connector.READ_WRITE);
httpConnector.setRequestMethod(HttpConnection.GET) ;
in = httpConnector.openInputStream();
byte[] data = new byte[in.available()];
int len = 0;
int size = 0;
StringBuffer raw = new StringBuffer();
while (-1 != (len = in.read(data))) {
raw.append(new String(data, 0, len));
size += len;
}
content = raw.toString().trim();
}
catch(Exception ex)
{
ex.printStackTrace();
return false;
}
try{
in.close();
in =null;
httpConnector.close();
httpConnector =null;
}catch(Exception ex)
{
Dialog.alert("Error:" + ex.getMessage());
return false;
}
}
을 설정하는 다음 코드를 사용하고 있지만 값이 올 수 없습니다.
available()
메서드는 반환
byte[] data = new byte[in.available()];
얼마나 많은 바이트가 InputStream로부터 읽기 위해 즉시 사용할 수 있습니다 내가 시뮬레이터에서 테스트하고, 나는
동일한 코드 – rupesh