Https VS Http 性能比拼(2)

发表于:2012-08-17来源:安卓巴士作者:孤独狂饮点击数: 标签:性能比拼
sslContext.init(null, xtmArray, new java .security.SecureRandom()); } catch (GeneralSecurityException gse) { } if (sslContext != null) { HttpsURLConnection.setDefaultSSLSocketFactory(sslContext .getSo

  sslContext.init(null, xtmArray, new java.security.SecureRandom());

  } catch (GeneralSecurityException gse) {

  }

  if (sslContext != null) {

  HttpsURLConnection.setDefaultSSLSocketFactory(sslContext

  .getSocketFactory());

  }

  HttpsURLConnection.setDefaultHostnameVerifier(hnv);

  }

  private static HttpsUtils instance = null;

  public static HttpsUtils getInstance(){

  if (instance == null) {

  instance = new HttpsUtils();

  }

  return instance;

  }

  复制代码

  按理来说,基本所以的智能手机都是支持的!我不太确定哈,如果不放心的话 就使用Testin 简单测测吧!

原文转自:http://www.ltesting.net