String SBM="L35&2 G-2A+2G2F2E2D4D2C2D2A+4G4A+2G2C4C2A2C4C2A2C2A2G2F2E2F4D2C2";//这是由nok2phone把midi转换成的字符串,注意:L35&2后有空格,后边的的字符串的空格都删除了 System.out.println(SBM); byte[] SendBinMsg=SBM.getBytes(); int a=0; int b; for (i=1; i<SendBinMsg.length; i++) { b=(int)SendBinMsg; a=a^b; } byte xx=(byte)(a^0xff00); int yy=(int)xx; System.out.println("xx"); System.out.println(xx); int ta; ta=yy/16; int tb; tb=yy%16; System.out.println("ta"); System.out.println(ta); System.out.println("tb"); System.out.println(tb); //把ta tb加到SBM的最后就可以啦 //SBM+&&+TA+TB
|