• 笔记



      /*String hexString = Integer.toHexString((byte) bytes[2] & 0x00FF);
         String string = new BigInteger(hexString,16).toString();
         Integer wifiHotCount = Integer.valueOf(string);
      //获取wifi热点数据
        for (int i = 1; i <= wifiHotCount; i++) {
        for (int j = 0; j < 7; j++) {
         if (Integer.toHexString(bytes[s] & 0x00FF).length() == 1) {
          if (j != 6)
           wifiHot += "0" + Integer.toHexString(bytes[s] & 0x00FF) + ":";
          if (j == 6) {
           wifiHot = wifiHot.substring(0, wifiHot.length() - 1);
           wifiHot += "," + Integer.toHexString(bytes[s] & 0x00FF)+";";
          }
          s = s + 1;
         } else {
          if (j != 6)
           wifiHot += Integer.toHexString(bytes[s] & 0x00FF) + ":";
          if (j == 6) {
           wifiHot = wifiHot.substring(0, wifiHot.length() - 1);
           wifiHot += "," + Integer.toHexString(bytes[s] & 0x00FF)+";";
          }
          s = s + 1;
         }
     
        }
       //String kString=wifiHot;
       //wifiHot="";
       // System.out.println(kString);
      }*/
     /*  wl = wifiHot.substring(0, wifiHot.length() - 1);
       //获取mccmnc对应的十进制数
       int mccmncStart=10+(wifiHotCount-1)*7+8;
       int i=mccmncStart;
       String mcc="";
       String mnc="";
       while(i<=mccmncStart+1){
        if(Integer.toHexString(bytes[i] & 0x00FF).length()==1){
         mcc +="0"+Integer.toHexString(bytes[i] & 0x00FF);
             }
        else{mcc+=Integer.toHexString(bytes[i] & 0x00FF);}
       i++;
       }
       mcc=new BigInteger(mcc, 16).toString();//获取mcc对应的10进制数
       mnc=new BigInteger(Integer.toHexString(bytes[mccmncStart+2] & 0x00FF), 16).toString();//获取mnc对应的10进制数
      
      
      
      
      
      
       System.out.println(mcc);
       System.out.println(mnc);
    */
     

  • 相关阅读:
    下拉刷新ListView的实现原理
    自己总结的一些Java公用函数库
    异常处理的最佳实践[转载]
    Android Parcelable和Serializable的区别
    Android BroadcastReceiver介绍
    添加androidsupportv4 错误 java.lang.ClassNotFoundException: android.support.v4.view.ViewPager in loader dalvik.system.PathClassLoader
    [转载]SQL SERVER 数据类型详解
    pthread
    main参数
    实验二测试
  • 原文地址:https://www.cnblogs.com/wth21-1314/p/7561113.html
Copyright © 2020-2023  润新知